0

How do I correct this? If they answer "Yes" it output awesome and if they say "No" it outputs the else.

def main(): placeBeen = input("You ever been to alaksa? ") if placeBeen == "Yes": print("Awesome!") else: print("Oh really? How was it?")

7th Jul 2017, 7:04 PM
Kik Me: SheDrippinWet
Kik Me: SheDrippinWet - avatar
5 Antworten
+ 5
It seems like the only problem with this code is indentation. def main(): placeBeen = input("You ever been to Alaska? Y/N") if placeBeen == "Y": print("Awesome") else: print("Too Bad")
7th Jul 2017, 7:52 PM
Maya
Maya - avatar
+ 5
did you actually call the function at the end? def main(): placeBeen = input("You ever been to Alaska? Y/N") if placeBeen == "Y": print("Awesome") else: print("Too Bad") main()
7th Jul 2017, 7:57 PM
Maya
Maya - avatar
+ 3
Ugh!!! I been doing everything to try to make it right without help for the past 30min.. I'm a beginner I just started coding like, last night lol. But thanks a lot!! 😇👌🏾🤓
7th Jul 2017, 8:00 PM
Kik Me: SheDrippinWet
Kik Me: SheDrippinWet - avatar
0
I'm using Pythonista and I use 3.5. It doesn't execute :(
7th Jul 2017, 7:54 PM
Kik Me: SheDrippinWet
Kik Me: SheDrippinWet - avatar
0
standardize the input with "upper"
7th Jul 2017, 8:57 PM
Esteban Plaza
Esteban Plaza - avatar