Python Forum
Issue with if statement
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with if statement
#1
hi there guys, I am new with python and need help with this issue as I can't seem to find any answer when I run the code. The code I used is :-
x= int(input("Enter a number: "))
if x == 1:
y += 1
print("y")

Additionally is this code correct below.
from math import*
x = int(input("Enter a number: "))
y = 5
if x ** sqrt(2) :
y = y + x
print(y)
I know you guys must be like ask teacher but I did he said to check the materials or online. How am I gonna learn when you can't help me with the mistake I create and also help me understand it.

Reply


Messages In This Thread
Issue with if statement - by trixter6673 - Oct-30-2017, 11:53 PM
RE: Issue with if statement - by sparkz_alot - Oct-31-2017, 12:34 AM
RE: Issue with if statement - by heiner55 - Oct-31-2017, 08:08 AM
RE: Issue with if statement - by trixter6673 - Nov-01-2017, 01:52 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020