-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscore.py
58 lines (43 loc) · 1.66 KB
/
score.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
# A function that checks the matches between the two lists and prints a message accordingly
class score():
def score(com_balls, player_num, com_power, player_power):
count = 0 # counter for the matches between the two lists
count2 = 0 # counter for the matches power balls
for i in com_balls:
for j in player_num:
if i == j:
count += 1
if com_power == player_power:
count2 += 1
print("you got the power number")
resu = count + count2
print("you have **", resu, "** number correct")
if count == 5 and count2 == 1:
print("#*#*#*#**#*#*#")
print("Jackpot $324,000,000")
elif count == 5 and count2 == 0:
print("#*#*#*#**#*#*#")
print("You just won $1,000,000 ")
elif count == 4 and count2 == 1:
print("#*#*#*#**#*#*#")
print("You win $10,000 ")
elif count == 4 and count2 == 0:
print("#*#*#*#**#*#*#")
print("You win $100 ")
elif count == 3 and count2 == 1:
print("#*#*#*#**#*#*#")
print("You win $100 ")
elif count == 3 and count2 == 0:
print("#*#*#*#**#*#*#")
print("You win $7 ")
elif count == 2 and count2 == 1:
print("#*#*#*#**#*#*#")
print("You win $7 ")
elif count == 1 and count2 == 1:
print("#*#*#*#**#*#*#")
print("You win $4 ")
elif count == 0 and count2 == 1:
print("#*#*#*#**#*#*#")
print("You win $4 ")
else:
print("Better luck next time !")