-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroleta.py
More file actions
37 lines (29 loc) · 770 Bytes
/
roleta.py
File metadata and controls
37 lines (29 loc) · 770 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
36
37
from random import choice
blacklist = []
def add_num(lista):
esc_num = choice(lista)
lista.pop(lista.index(esc_num))
blacklist.append(esc_num)
return esc_num
print("Digite '0' quando terminar de digitar os valores")
lista = []
i = 1
while True:
valor = int(input(f'Digite o {i}º valor: '))
if valor == 0:
break
else:
i += 1
lista.append(valor)
print()
print('Digite 0 quando terminar de sortear\n')
ue = None
while ue != '0':
if lista:
print(f'sua lista é {lista}')
num = add_num(lista)
print(f'o valor tirado foi {num}')
ue = input('Digite qualquer coisa pra continuar: ')
else:
break
print(f'Sua BlackList é {blacklist}')