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?")
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")
+ 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()
+ 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!! 😇👌🏾🤓
0
I'm using Pythonista and I use 3.5. It doesn't execute :(
0
standardize the input with "upper"