+ 1
Why is this invalid syntax
name=input("enter a name:") if your name=="mohamed": print("hello the praised one") else: print("oh hello")
7 ответов
+ 3
"your" is not a keyword, builtin, or instatiated variable. I am pretty sure you got an error message saying something similar.
+ 3
The name of the variable is "name" so in line 2 why have you changed it to your name
It wil give an error varible undefined
Remove "your"
+ 2
What is "your"?
if name=="mohamed":
+ 1
Oh thx
+ 1
So much it works now
0
What do you mean
0
This is python