-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
37 lines (36 loc) · 895 Bytes
/
main.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
import random as ra
import math
all_nos = list()
for i in range(1, 101):
all_nos.append(i)
#print(all_nos)
used_nos = list()
def ranno():
a = ra.randrange(1,101)
if a in used_nos:
ranno()
else:
pass
used_nos.append(a)
all_nos.remove(a)
print("The next number is: ",a)
def nosnotleft():
print("The numbers that have been called out are: ", used_nos)
def noleft():
print(all_nos)
for i in range(10):
inp = input("What do you want to do ? ")
if inp == "Next Number":
inp2 = int(input("How many numbers you want ?"))
i = 0
for i in range(inp2):
print(ranno())
i += 1
elif inp == "Numbers already called":
print(nosnotleft())
elif inp == "Numbers not called yet":
print(noleft())
elif inp == "Quit":
break
else:
print("Invalid Command")