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 = 3
correct = 0

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

rsp = question_with_response("What is python?")
if rsp == "A language that focuses on code readability":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("What can it be used for?")
if rsp == "object oriented, structured, or functional tasks":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("What language does python use?")
if rsp == "The english language":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

print(getpass.getuser() + " you scored " + str(correct) +"/" + str(questions))
Hello, qaisjamili running /bin/python3
You will be asked 3 questions on the topic of python.
Question: Are you ready to take a test?
Answer: 
Question: What is python?
A language that focuses on code readability is correct!
Question: What can it be used for?
object oriented, structured, or functional tasks is correct!
Question: What language does python use?
The english language is correct!
qaisjamili you scored 3/3