-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtabuleiro.py
49 lines (34 loc) · 1.12 KB
/
tabuleiro.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
# -*- coding: utf-8 -*-
"""Tabuleiro.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1o7XHVpRrMaWomSuLs-rwhq5y5yO-tRNJ
"""
from IPython.display import clear_output
import random
tabuleiroPrincipal=[[],[],[],[]]
mylist = ['!','@','#','$','%','*','~','?','!','@','#','$','%','*','~','?']
listVisual=[['@', '*', '?', '#'], ['~', '$', '$', '~'], ['%', '@', '?', '%'], ['!', '#', '*', '!']]
random.shuffle(mylist)
for i in mylist:
for listAp in tabuleiroPrincipal:
if len(listAp)<=3:
listAp.append(i)
break
def Visualizar():
print("---------TABULEIRO EXEMBPLO--------------")
print("-----------------------------------------")
for i in listVisual:
print(i)
print("-----------------------------------------")
def tentativa(list):
print('|---------------------------------------|')
print('-----------Tabuleiro Real!---------------')
for j in tabuleiroPrincipal:
print(j)
op1=input("Digite a opção 1:")
p2=input("Digite a opção 2:")
clear_output()
tentativa(list)
Visualizar()
tentativa(tabuleiroPrincipal)