import getpass, sys

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

questions = 4
correct = 0

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

rsp = question_with_response("What is the answer for x? 2x+5=7")
if rsp == "1":
    print(rsp + " Your answer is correct")
    correct += 1
else:
    print(rsp + " Your answer is incorrect")

rsp = question_with_response("What is the shape of function, 6x² + 11x - 35?")
if rsp == "quadratic":
    print(rsp + " Your answer is correct")
    correct += 1
else:
    print(rsp + " Your answer is incorrect")

rsp = question_with_response("What is the y-intercept of this function? y=2x+3")
if rsp == "3":
    print(rsp + " Your answer is correct")
    correct += 1
else:
    print(rsp + " Your answer is incorrect")

rsp = question_with_response("What is the root of this function? y=2(x+3)")
if rsp == "-3":
    print(rsp + " Your answer is correct")
    correct += 1
else:
    print(rsp + " Your answer is incorrect")

print(getpass.getuser() + " you scored " + str(correct) +"/" + str(questions))
Hello, anton running c:\Users\anton\AppData\Local\Programs\Python\Python310\python.exe
You will be asked 4 questions.
Question: Are you ready to take a test?
Question: What is the answer for x? 2x+5=7
1 Your answer is correct
Question: What is the shape of function, 6x² + 11x - 35?
3 Your answer is incorrect
Question: What is the y-intercept of this function? y=2x+3
-3 Your answer is incorrect
Question: What is the root of this function? y=2(x+3)
3 Your answer is incorrect
anton you scored 1/4