@tesla809/

Timed App Quiz app in Python3

Python

Timed App Quiz app in Python From team treehouse

fork
loading
Files
  • main.py
  • questions.py
  • quiz.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Using datetime to make an app that will ask us math questions
and time our answers.
"""
from quiz import Quiz
   
 
# create class to keep track of quiz scores over time?
def main():
    while True:
        quiz_prompt = input('Do you want a math quiz? y/n')
        if quiz_prompt.lower()[0] == 'y':
            quiz1 = Quiz()  # start quiz
            quiz1.take_quiz()
        elif quiz_prompt.lower()[0] == 'n':
            print('Ok. Goodbye')
            break
        else:
            print('Enter a valid input: y/n')
main()