SHARE
TWEET

cod vlh

a guest Jul 16th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2.  
  3. alegere = random.randint(1,3)
  4.  
  5. rps = input('p , s ,r' )
  6. p=1
  7. s=2
  8. r=3
  9.  
  10. print(alegere)
  11. if rps == 'p':
  12.     if alegere == s:
  13.         print('calculatorul castiga')
  14.     elif alegere == p:
  15.         print('egal')
  16.     else:
  17.         print('ai castigat')
  18.  
  19. if rps == 's':
  20.    if alegere == r:
  21.        print('calculatorul castiga')
  22.    elif alegere == s:
  23.        print('egal')
  24.    else:
  25.        print('ai castigat')
  26.  
  27. if rps == 'r':
  28.     if alegere == p:
  29.         print('calculatorul castiga')
  30.     elif alegere == r:
  31.         print('egal')
  32.     else:
  33.         print('ai castigat')
  34. else:
  35.     print('pune rps')
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