added some final stage to the quiz

This commit is contained in:
samialazar 2020-06-26 15:58:27 +02:00
parent 38839f5d3b
commit 8561dbab9f
3 changed files with 15 additions and 7 deletions

View file

@ -0,0 +1 @@
sami@afro-linux-lenovo-b50-30.2711:1593172229

View file

@ -1 +0,0 @@
sami@afro-linux-lenovo-b50-30.18673:1593006374

View file

@ -29,7 +29,7 @@ questions = [
Question(question_prompts[9], "a"),
]
def run_quiz(questions):
def quiz(questions):
score = 0
for question in questions:
answer = input(question.prompt)
@ -37,6 +37,7 @@ def run_quiz(questions):
score += 5
print("Correct! Your score is", score,)
else:
print("Incorrect!")
score -= 3
@ -45,9 +46,16 @@ def run_quiz(questions):
print ("\n")
# Final stage
score = 0
if score >= -30:
print("Your total score is:", score, "- You suck!")
elif score == 10 or 15 :
print("Your total score is:", score, "- You went ok!")
else:
print("Your total score is:", score, "- You are awesome!")
run_quiz(questions)
quiz(questions)