PaweU

Jesienny Deszczyk

Oct 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. import random
  2. random.seed()
  3.  
  4. szer = 7
  5.  
  6. wys = 7
  7.  
  8. losowania = []
  9.  
  10. for a in range (wys):
  11.     losowania.append(-1)
  12.  
  13.    
  14.    
  15. for i in range (wys): #numer drukowanej planszy
  16.     los = random.randrange (szer)
  17.     losowania.insert(0, los)
  18.          
  19.     for y in range (wys):
  20.         for x in range (szer):
  21.             if (x == losowania[y]):
  22.                 print ("x", end=" ")
  23.             else:
  24.                 print ("o", end=" ")
  25.         print ("")
  26.     print ("")
Add Comment
Please, Sign In to add comment