0
A simple one
Hi guys. Why this code do not run on the playground? print("What'\ns your gender?\n1-male\n2-female") user_input = input("Enter: ") if user_input == "1": print("Bad") else: print ("You are the day flower") I am begginer, may it lacks something that i can't see. Thanks.
1 Odpowiedź
+ 1
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2277/
"Python uses indentation (white space at the beginning of a line) to delimit blocks of code. Other languages, such as C, use curly braces to accomplish this, but in Python indentation is mandatory; programs won't work without it. As you can see, the statements in the if should be indented."
Here you can find an example of the code with the else section too:
https://www.sololearn.com/learn/Python/2278/