Let's say I have if user.lower() == 'start':
If they type something wrong, or make a typo, it just ends the program and you have to restart all over. How would I counter that? I know I'll need an else, but what then?
Sorry for long code, all that's relevant is where is says if user.lower() == 'start'
to the bottom where the else statement is
user = input(f"\nJohnny: Well, it's time, {name}. Your very first space trip. How you feeling, man??\nOptions: Good, not so good, bad, scared, nervous: ")
if user.lower() == 'good':
print("\nJohnny: That's good to hear! It's a bit nerve-wracking at first, but I promise it's not that bad after a little\n")
sleep(4)
print('\nAs you finish talking to Johnny, the sergeant, Mark, comes up to you\n')
sleep(4)
elif user.lower() == 'not so good':
user = input("\nJohnny: Ah, I'm sorry about that. You just nervous?\nOptions: Yeah, Yes, No")
if user.lower() == "yeah" or "yes":
print("\nJohnny: Yeah, I get it. I'm sure you'll do just fine! Like I said, I promise it's not all that bad once you're used to it! You can do it!\n")
print("\nAs you finish talking to Johnny, the general, Mark, comes up to you\n")
sleep(4)
elif user.lower() == 'no':
print("\nJohnny: No? Then I couldn't imagine why you'd not be feeling good, this is a dream for most haha")
sleep(4)
print("\nAs you finish talking to Johnny, the general, Mark, comes up to you\n")
elif user.lower() == 'bad':
user = input("\nJohnny: Sorry about that, man. I get it, it's your first time going into the giant vacuum of space. You'll be fine!\nOptions: Gee thanks, laugh, or press enter to skip: ")
if user.lower() == 'gee thanks':
print('\nGee, thanks, Johnny. What a truly great pep-talk that was! Really eased my nerves -_-')
sleep(4)
print("\nJohnny: Haha, you know I'm just messing with you. You'll do great, I swear")
sleep(4)
print("As you finish talking to Johnny, the general, Mark, comes up to you\n")
sleep(4)
elif user.lower() == 'laugh':
print("\nHahaha, you're soo funny, Johnny -_-")
sleep(4)
print("\nJohnny: I'm just kidding, my guy. I know you're nervous, I was too my first trip up there. You'll do great, I know it")
sleep(4)
print('As you finish talking to Johnny, the general, Mark, comes up to you\n')
sleep(4)
elif user.lower() == 'nervous':
print("\nJohnny: Who wouldn't be, let alone on their first time. It takes a brave soul to do what you're about to do")
print("\nAs you finish talking to Johnny, the general, Mark, comes up to you\n")
sleep(4)
else:
print('Invalid, retry')```