import getpass, sys

def question_with_response(prompt):
    print("Question: " + prompt)
    msg = input()
    return msg

questions = 3
correct = 0

print('Hello, ' + getpass.getuser() + " running " + sys.executable)
print("You will be asked " + str(questions) + " questions.")

rsp = question_with_response("What command is used to include other functions that were previously developed?")
if rsp == "import":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("What command is used to evaluate correct or incorrect response in this example?")
if rsp == "if":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("Each 'if' command contains an '_________' to determine a true or false condition?")
if rsp == "expression":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")
    
rsp = question_with_response("What grade is Lydia?")
if rsp == "11th":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("When is Lydia's birthday?")
if rsp == "April 12th":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")
print(getpass.getuser() + " you scored " + str(correct) +"/" + str(questions))

rsp = question_with_response("What is Lydia's favorite color?")
if rsp == "grey":
    print(rsp + " is correct!")
    correct += 1
else:    print(rsp + " is incorrect!")
Hello, lydiacho running /Users/lydiacho/opt/anaconda3/bin/python
You will be asked 3 questions.
Question: What command is used to include other functions that were previously developed?
import is correct!
Question: What command is used to evaluate correct or incorrect response in this example?
if is correct!
Question: Each 'if' command contains an '_________' to determine a true or false condition?
expression is correct!
Question: What grade is Lydia?
 is incorrect!
Question: When is Lydia's birthday?
April 12th is correct!
lydiacho you scored 4/3
Question: What is Lydia's favorite color?
Grey is incorrect!