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

print('Welcome to my soccer quiz, ' + 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("How many balon d'ors has Lionel Messi won?")
if rsp == "7":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("Which team has won the most amount of champions league titles?")
if rsp == "Real Madrid":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("Who won the 2018 edition of the FIFA World Cup?")
if rsp == "France":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("What is it called when a player without the ball on the offensive team is behind the last defender or fullback?")
if rsp == "Offside":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("What is given if the attacking team is fouled inside the penalty box?")
if rsp == "Penalty kick":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

print(getpass.getuser() + " you scored " + str(correct) +"/" + str(questions))
Welcome to my soccer quiz, aniket running /opt/homebrew/opt/python@3.10/bin/python3.10
You will be asked 5 questions.
Question: Are you ready to take a test?
Answer: yes
Question: How many balon d'ors has Lionel Messi won?
7 is correct!
Question: Which team has won the most amount of champions league titles?
Real Madrid is correct!
Question: Who won the 2018 edition of the FIFA World Cup?
France is correct!
Question: What is it called when a player without the ball on the offensive team is behind the last defender or fullback?
Offside is correct!
Question: What is given if the attacking team is fouled inside the penalty box?
Penalty kick is correct!
aniket you scored 5/5