0

whats wrong with my code?

str(input("Sou aresei na vlepeis Shad0wSt3ps?:" + ("(NAI/OXI)"))) #(YES/NO) def ("NAI"): print("EISAI KALA?") def ("OXI"): print("You have chosen the right path") input()

20th May 2020, 12:58 PM
sofronis
sofronis - avatar
7 Réponses
0
Your input has no variable attached. Try: choice = input() The function names are surrounded by parenthesis. Try: def func(): print('whatever') And that bottom call to input will ask for an input with no prompt, but thats it. Once you have your first input, then use if statements like: if (this happens): (do this) else: (do this instead)
20th May 2020, 1:05 PM
Slick
Slick - avatar
0
@Slick i get what you are trying to say, but i dont understand how to imploment it on my code
20th May 2020, 1:15 PM
sofronis
sofronis - avatar
0
Thats cool man, it does seems like a lot. But if you break it into pieces its much more managable. Work on getting, and printing input before you work with manipulating output with it. a = 'hello' print(a)
20th May 2020, 1:17 PM
Slick
Slick - avatar
0
@Slick idk if you are trying to be ironic, but thats like super easy
20th May 2020, 1:24 PM
sofronis
sofronis - avatar
0
Not at all man, i mean no offense. I just dont know exactly what you know, I'm not in your head partner. Once you have that then just take it to the next step. a = input('Enter a letter or two') print(a)
20th May 2020, 1:26 PM
Slick
Slick - avatar
0
@Slick ok
20th May 2020, 1:34 PM
sofronis
sofronis - avatar
0
Then after you got that down a = input('Enter yes or no') # "if statements" come in now if a == 'yes': print('You typed yes!') elif a == 'no': print('You typed no!') else: print('Can you repeat that? ')
20th May 2020, 1:38 PM
Slick
Slick - avatar