Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- phrase = input("Talk to Me>")
- if phrase == "hi" or phrase=="hey":
- print("hello")
- elif phrase == "What is your name" or phrase=="what's your name":
- print ("Marvick")
- else:
- print("sorry i dont understand "+"'"+phrase+"'")
- print("Lets test your knowledge")
- Q1 = input("are you ready? ")
- if Q1 == "yes" or Q1 == "bring it on":
- print("In Python, a decision can be made by using if else statement")
- Q2=input("True or False? ")
- if Q2 == "true" or Q2 == "True" or Q2 == "TRUE":
- print("your answer is correct")
- elif Q2 == "FALSE" or Q2 == "False" or Q2 == "false":
- print("your answer is incorrect")
- else:
- print("invalid answer")
- elif Q1 == "no":
- print("Please comeback when you are ready")
- else:
- print("sorry i dont understand "+"'"+Q1+"'")
- print ("See you again")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement