-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_menu.py
59 lines (46 loc) · 3.5 KB
/
main_menu.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from colorama import init
from termcolor import colored
import time
import playmaths
import scores
init()
global g
#fcn for timedelay messages
def time_msg(s,clr='cyan'):
for i in s:
print(colored(i,clr),end='',flush=True)
time.sleep(0.01)
return ' '
print(colored(
'''
██████ █████ █████ █████ ███████████ █████ ███ █████ █████ ███████████ █████████ ███████████ ██████████
███░░░░███ ░░███ ░░███ ░░███ ░█░░░░░░███ ░░███ ░███ ░░███ ░░███ ░█░░░░░░███ ███░░░░░███ ░░███░░░░░███ ░░███░░░░███
███ ░░███ ░███ ░███ ░███ ░ ███░ ░███ ░███ ░███ ░███ ░ ███░ ░███ ░███ ░███ ░███ ░███ ░░███
░███ ░███ ░███ ░███ ░███ ███ ░███ ░███ ░███ ░███ ███ ░███████████ ░██████████ ░███ ░███
░███ ██░███ ░███ ░███ ░███ ███ ░░███ █████ ███ ░███ ███ ░███░░░░░███ ░███░░░░░███ ░███ ░███
░░███ ░░████ ░███ ░███ ░███ ████ █ ░░░█████░█████░ ░███ ████ █ ░███ ░███ ░███ ░███ ░███ ███
░░░██████░██ ░░████████ █████ ███████████ ░░███ ░░███ █████ ███████████ █████ █████ █████ █████ ██████████
░░░░░░ ░░ ░░░░░░░░ ░░░░░ ░░░░░░░░░░░ ░░░ ░░░ ░░░░░ ░░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░░
''', 'green'))
name=input(time_msg('Enter your name :'))
time_msg('''
Welcome users, this is a python program that lets you create and play Quizzes
Press[1] for attending a quiz Press[2] Scoreboard
''')
print()
g = int(input(''))
if g==1:
time_msg('''
For every correct answer you will be awarded +1 mark
For every wrong answers -1 will be deducted
''')
print()
time_msg('Enter the subject: [0] Maths [1] Physics [2] Chemistry')
print()
sub=int(input(''))
print()
if sub==0:
score=playmaths.play_quiz()
scores.enter_name(name,score)
if g==2:
scores.show()