-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlotto.py
More file actions
76 lines (47 loc) · 1.51 KB
/
lotto.py
File metadata and controls
76 lines (47 loc) · 1.51 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import random
count = 0
one=1
two=2
three=3
four=4
five=5
six=6
special=0
numbersGen = [one, two, three, four, five, six, special]
for i in range(6):
numbersGen[i] = random.randint(1,49)
#uOne, uTwo, uThree, uFour, uFive, uSix, uSpecial
print(numbersGen)
uOne = int(input("Enter first number: "))
uTwo = int(input("Enter second number: "))
uThree = int(input("Enter third number: "))
uFour = int(input("Enter fourth number: "))
uFive = int(input("Enter fifth number: "))
uSix = int(input("Enter sixth number: "))
uSpecial = input("Enter super number: ")
numbersUser = [uOne, uTwo, uThree, uFour, uFive, uSix]
def compare_lists(x, y):
global count
equals = set(x).intersection(y)
for equal in equals:
count += 1
return count
def getWin():
if count == 0:
print("You won nothing. Try again next time\n")
elif count == 1:
print("You got one number right. Maybe you have more luck next time!")
elif count == 2:
print("You got two numbers right. Not bad but I wish you more luck next time!")
elif count == 3:
print("You got three numbers! Really well done")
elif count == 4:
print("Wow, four correct guesses! Keep it up!")
elif count == 5:
print("Dang, almost got super lucky there!")
elif count == 6:
print("You must be a God or something")
elif count == 7:
print("Holy Crap! You cracked the JackPot!!!")
compare_lists(numbersGen, numbersUser)
getWin()