Boolean HW
# Here is a python template for you to use.
cost = 1;
if (cost <= 50):
print("This is a good product!");
else:
if (cost >= 50):
print("This is too expensive!");
else:
print("This product is cheap")
import getpass, sys
def question_with_response(prompt):
print("Question: " + prompt)
msg = input()
return msg
questions = 3
correct = 0
print("Hey Hey! It's time to take a quiz! You qill be asked 3 very vague questions based on common knowledge")
rsp = question_with_response("Are you ready?")
if rsp == "Yes":
print("Alright! Let's get started!")
else: print("Whoops,Didn't quite catch that")
rsp = question_with_response("What shape has 4 sides and rhymes with 'hair'?")
if rsp == "Square":
print(rsp + " is the right answer!")
correct += 1
else: print(rsp + " is incorrect, oooh...")
rsp = question_with_response("What month has only 28 days?")
if rsp == "February":
print(rsp + " is the right answer!")
correct += 1
else: print(rsp + " is incorrect, oooh...")
rsp = question_with_response("Is Mr. Mortensen a good teacher?")
if rsp == "Yes":
print(rsp + " is the right answer!")
correct += 1
else: print(rsp + " is incorrect, oooh...")
print("You're Winner!")