@DARKLORD6474/

# Python Only coursework

## No description

Files
• main.py
• usermodule.py
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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
```
```from random import randint

print('Authtorised Entry Only')

while True:
counter=5
while(counter >0):
counter=counter-1

print('Welcome PLAYER1')
break
if counter == 0:
print ('you have exceeded ur chances, please try again in 30 seconds')
from time import sleep
for i in range(5):
print(5-i, 'secs left')
sleep(1)

while(counter >0):
counter=counter-1

print('Welcome PLAYER2')
break
if counter == 0:
print ('you have exceeded ur chances, please try again in 30 seconds')
from time import sleep
for i in range(5):
print(5-i, 'secs left')
sleep(1)

else:
print('please try again, you have',counter,'times left')

break

l = ['red','black','yellow']
player1cards = []
player2cards = []
count = 0
if count == 0 or count == 2 or count == 4 or count == 6 or count == 8 or count == 10 or count == 12 or count == 14 or count == 16 or count == 18 or count == 20 or count == 22 or count == 24 or count == 26 or count == 28 or count == 30:
playernumb  = 1
else:
playernumb  = 2

for i in range(30):
result = l[randint(0,2)]
print('')
if result == 'red':
l3=['1','2','3','4','5','6','7','8','9','10']
result2 = l3[randint(0,len(l3)-1)]
print('Player',playernumb,'Picked a',result,result2 )
if playernumb == 1:
player1cards.append('red' + result2)
elif playernumb != 1:
player2cards.append('red' + result2)
l3.remove(result2)

if result == 'black':
l4=['1','2','3','4','5','6','7','8','9','10']
result3 = l4[randint(0,len(l4)-1)]
print('Player Picked a',result,result3)
if playernumb == 1:
player1cards.append('black ' + result3)
elif playernumb != 1:
player2cards.append('black ' + result3)
l4.remove(result3)

if result == 'yellow':
l2=['1','2','3','4','5','6','7','8','9','10']
result4 = l2[randint(0,len(l2)-1)]
print('Player Picked a',result,result4)
if playernumb == 1:
player1cards.append('yellow' + result4)
elif playernumb != 1:
player2cards.append('yellow' + result4)
l2.remove(result4)
count = count + 1
print('')

```