forked from INDHU-P/Basic_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.py
More file actions
44 lines (43 loc) · 989 Bytes
/
base.py
File metadata and controls
44 lines (43 loc) · 989 Bytes
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
import os
import time
from diceroller import dice
from guess import guesser
import hangman
import currencyconvertor
from passwordgenerator import generate
import tictactoe
import minesweeper
while True:
os.system("clear")
try:
choice = int(input(("""
Enter your choice:\n1.Dice Roller
2.Guess the number game\n3.Hangman Game\n4.Currency currency
5.Random Password Generator\n6.Tic Tac Toe\n7.Minesweeper\n0.Exit\n""")))
except ValueError:
print("Wrong input")
time.sleep(0.2)
continue
os.system("clear")
if choice == 1:
dice()
break
elif choice == 2:
guesser()
break
elif choice == 3:
hangman()
elif choice == 4:
currencyconvertor()
elif choice == 5:
generate()
break
elif choice == 6:
tictactoe()
elif choice == 7:
minesweeper()
elif choice == 0:
exit()
else:
print("Wrong Choice")
time.sleep(0.3)