import getpass, sys

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

# defining q and c as question and correct answer
q = 6
c = 0

# setting up the of the questions

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

# asking 6 question

rsp = question_with_response("What command is used to include other functions that were previously developed?")
if rsp == "import":
    print(rsp + " is correct!")
    c += 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!")
    c += 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!")
    c += 1
else:
    print(rsp + " is incorrect!")
rsp = question_with_response("What is another word for putting data into you computer?")
if rsp == "input":
    print(rsp+  " is correct!")
    c += 1
else: 
    print(rsp + " is incorrect!")

rsp = question_with_response("If you see several lines of code in order, what is it known as?")
if rsp == "sequence":
    print(rsp + " is correct!")
    c += 1
else: 
    print(rsp + " is incorrect!")

rsp = question_with_response("What is a Print Working Directory known as?")
if rsp == "pwd":
    print(rsp + "  is correct!")
    c += 1
else: 
    print(rsp + " is incorrect!")

# creating ratio/percentages between c and q

print(getpass.getuser() + " you scored " + str(c) +"/" + str(q))

y =  c/q
x = int (100*y)
print("Or " + str(x) + "%")
Hello, amaya running /bin/python3
You will be asked 6 questions.
Question: Are you ready to take a test?
Answer: yes
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 is another word for putting data into you computer?
input is correct!
Question: If you see several lines of code in order, what is it known as?
sequen is incorrect!
Question: What is a Print Working Directory known as?
pwd  is correct!
amaya you scored 5/6
Or 83%