0
Why wont this work
X = input("") Print(x) If x == yo: Print("hi") Else: Print("ok")
2 Antworten
+ 1
Let me type the correct code:
x = input("")
print(x)
if x == "yo":
print("hi")
else:
print("ok")
Now read and check.
The variable's name is x and must be always written in lower cases, becuase the language is case sensitive (X is recognized as another variable).
The first letter of the functions are lower cases too.
The instructions into an if statement must be indented, otherwise are out of it.
"yo" must be between quotes, otherwise is recognized as a variable by the interpreter.
The keywords (if, else) must be lower case too.
+ 1
first of all u must define x not X ( X have another value )..
and "yo" must be between quotes.
good luck bro 😉