daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Oct 16th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from random import randint
  2. pocetcisel = 6
  3. retezec = []
  4. while(pocetcisel > 0):
  5.     cislo = randint(1,49)
  6.     if not(cislo in retezec):
  7.         retezec.append(cislo)
  8.         pocetcisel -= 1
  9.  
  10. pocetcisel = 6
  11. hadanycisla = []
  12. while(pocetcisel > 0):
  13.     veta = "máš ještě " + str(pocetcisel) + " losů "
  14.     cislo = int(input(veta))
  15.     if cislo > 49:
  16.         continue
  17.     if not(cislo in hadanycisla):
  18.         hadanycisla.append(cislo)
  19.         pocetcisel -= 1
  20.  
  21. pocetvyher = 0
  22. for x in hadanycisla:
  23.     if x in retezec:
  24.         pocetvyher += 1
  25.        
  26. print('Uhodl jsi ' + str(pocetvyher) + ' cisel!')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top