-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtwister.py
More file actions
35 lines (29 loc) · 808 Bytes
/
twister.py
File metadata and controls
35 lines (29 loc) · 808 Bytes
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
import random
side = ["правая", "левая"]
part = ["нога", "рука"]
color = ["жёлтый", "красный", "зелёный", "синий"]
players = []
while True:
player = input("Игрок: ")
if player == "":
break
else:
players.append(player)
pn = 0
while True:
command = input("Ход: ")
if command == "":
if random.randrange(9) == 0:
print(players[pn], "—", "cвободный выбор")
else:
print(players[pn], "—",
random.choice(side),
random.choice(part), "на",
random.choice(color), "круг"
)
pn += 1
if pn >= len(players):
pn = 0
else:
break
print("Пока-пока!")