Advertisement
Guest User

Untitled

a guest
Sep 18th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.56 KB | None | 0 0
  1. keep_going = ""
  2. while keep_going == "":
  3.     print("Hello, my name is Chat Bot Charlie")
  4.  
  5.     Name = input("What is your name?")
  6.     print("Oh my! {} is a nice name!".format(Name))
  7.  
  8.     choc = input("Do you like chocolate? ").lower()
  9.  
  10.     if choc == "yes" or choc == "y" or choc == "yeah": # If they answer yes to print I like chocolate too
  11.         print("I like chocolate too! :)")
  12.  
  13.     elif choc == "no" or choc == "n" or choc == "nah": # If user answers no print aw darn
  14.         print("Aw darn :(")
  15.     # If users enters random keys say I don't understand
  16.     else:
  17.         print("Huh? Didn't quite get you there... :/")
  18.  
  19.     keep_going = input("Type 'ent' to continue or 'q' to quit") # User gets choice to continue
  20.  
  21.     if keep_going == "q":
  22.         print("Goodbye and have a nice day!")
  23.         break
  24.     elif keep_going == "ent":
  25.  
  26.  
  27.  
  28.         choc_joke = input("Speaking of chocolate... do you wanna hear a joke?") # Bot asks chocolate joke after asking about chocolate
  29.         if choc_joke == "yes" or choc_joke == "y" or choc_joke == "yeah":
  30.             choc_joke_what = input("What kind of candy is never on time?")
  31.  
  32.             if choc_joke_what == "what" or choc_joke_what == "w":
  33.                 print("ChocoLATE... :D")
  34.  
  35.             elif print("What? :/"):
  36.  
  37.                 if choc_joke == input ("no" or choc_joke == "n" or choc_joke == "nah"):
  38.                     print("Oh, nevermind then... :/")
  39.         else:
  40.             print("Huh? I guess not :/")
  41.  
  42.         keep_going = input("Press <enter> to continue or any key to quit")
  43.  
  44. print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement