Advertisement
dali10

Untitled

Apr 1st, 2023
1,090
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.19 KB | Gaming | 0 0
  1. from random import*
  2. player = input("enter ur name")
  3. l = int(input("how u wanna try ?"))
  4. x = randint(1,3)
  5. score_comp = 0
  6. score_player = 0
  7. for i in range (l):
  8.     n = int(input("put ur choice 1:rock , 2 : paper or 3:cissorz"))
  9.     if (n == 1 and x == 1):
  10.         print("NULL the computer choose",x)
  11.         score_comp+1
  12.     elif (n == 1 and x== 2):
  13.         print("the computer win , he choose ",x)
  14.         score_comp+=1
  15.     elif (n == 1 and x == 3):
  16.         print(player +"win bc the computer choose"+x)
  17.         score_player+=1
  18.     if (n == 2 and x == 1):
  19.         print(player,"win bc the computer choose ",x)
  20.         score_player+=1
  21.     elif (n == 2 and x== 2):
  22.         print("NULL the computer choose",x)
  23.     elif (n == 2 and x == 3):
  24.         print("computer win bc he choose ",x)
  25.         score_comp+=1
  26.     if (n == 3 and x == 1):
  27.         print("computer win bc he choose ",x)
  28.         score_comp+=1
  29.     elif (n == 3 and x== 2):
  30.         print(player,"win and the computer choose ",x)
  31.         score_player+=1
  32.     elif (n == 3 and x == 3):
  33.         print("NULL the computer choose ",x)
  34. print("le score de ",player,"est : ",score_player)
  35. print("le score de l'oridnateur est : ",score_comp)
  36.  
Tags: Luck
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement