-
Notifications
You must be signed in to change notification settings - Fork 0
/
pick_3.py
42 lines (23 loc) · 1.41 KB
/
pick_3.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
import random
RAND_MIN = 0
RAND_MAX = 9
MAX_COMPARISONS = 1000
i = 0
j = 0
k = 0
pick_3_numbers = [0, 0, 0]
user_input = [0, 0, 0]
random.seed()
user_input[0] = input("Enter first number: ")
user_input[1] = input("Enter second number: ")
user_input[2] = input("Enter third number: ")
print("\nRunning comparisons...\n")
for i in range(1, MAX_COMPARISONS):
pick_3_numbers = [random.randint(RAND_MIN, RAND_MAX), random.randint(RAND_MIN, RAND_MAX), random.randint(RAND_MIN, RAND_MAX)]
if int(user_input[0]) == pick_3_numbers[0] and int(user_input[1]) == pick_3_numbers[1] and int(user_input[2]) == pick_3_numbers[2]:
print("STRAIGHT MATCH FOUND AT DRAW " + str(i))
if int(user_input[1]) == pick_3_numbers[1] and int(user_input[2]) == pick_3_numbers[2]:
print("BACK MATCH FOUND AT DRAW " + str(i))
if int(user_input[0]) == pick_3_numbers[0] and int(user_input[1]) == pick_3_numbers[1]:
print("FRONT MATCH FOUND AT DRAW " + str(i))
print("\nComparisons completed.")