import getpass, sys

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

questions = 6
correct = 0

print('Hello, ' + getpass.getuser() + " running " + sys.executable)
print("You will be asked " + str(questions) + " questions.")
question_and_answer("Are you ready to take a test?")

rsp = question_with_response("What form of government is the United States?")
if rsp == "Representative Democracy":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("Who is the Speaker of the House?")
if rsp == "Nancy Pelosi":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("How many branches of government does the United States have?")
if rsp == "3":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("Who controls the Senate right now?")
if rsp == "Nobody":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("What is the name of the branch of Congress where each member serves 2 years?")
if rsp == "House of Representatives":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("What is the name of the government branch that the President works in?")
if rsp == "Executive":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")


print(getpass.getuser() + " you scored " + str(correct) +"/" + str(questions))
Hello, nicom running c:\Users\nicom\AppData\Local\Programs\Python\Python310\python.exe
You will be asked 6 questions.
Question: Are you ready to take a test?
Answer: 
Question: What form of government is the United States?
Representative Democracy is correct!
Question: Who is the Speaker of the House?
 is incorrect!
Question: How many branches of government does the United States have?
3 is correct!
Question: Who controls the Senate right now?
 is incorrect!
Question: What is the name of the branch of Congress where each member serves 2 years?
House of Representatives is correct!
Question: What is the name of the government branch that the President works in?
 is incorrect!
nicom you scored 3/6