Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- keep_going = ""
- while keep_going == "":
- print("Hello, my name is Chat Bot Charlie")
- Name = input("What is your name?")
- print("Oh my! {} is a nice name!".format(Name))
- choc = input("Do you like chocolate? ").lower()
- if choc == "yes" or choc == "y" or choc == "yeah": # If they answer yes to print I like chocolate too
- print("I like chocolate too! :)")
- elif choc == "no" or choc == "n" or choc == "nah": # If user answers no print aw darn
- print("Aw darn :(")
- # If users enters random keys say I don't understand
- else:
- print("Huh? Didn't quite get you there... :/")
- keep_going = input("Type 'ent' to continue or 'q' to quit") # User gets choice to continue
- if keep_going == "q":
- print("Goodbye and have a nice day!")
- break
- elif keep_going == "ent":
- choc_joke = input("Speaking of chocolate... do you wanna hear a joke?") # Bot asks chocolate joke after asking about chocolate
- if choc_joke == "yes" or choc_joke == "y" or choc_joke == "yeah":
- choc_joke_what = input("What kind of candy is never on time?")
- if choc_joke_what == "what" or choc_joke_what == "w":
- print("ChocoLATE... :D")
- elif print("What? :/"):
- if choc_joke == input ("no" or choc_joke == "n" or choc_joke == "nah"):
- print("Oh, nevermind then... :/")
- else:
- print("Huh? I guess not :/")
- keep_going = input("Press <enter> to continue or any key to quit")
- print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement