Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import*
- player = input("enter ur name")
- l = int(input("how u wanna try ?"))
- x = randint(1,3)
- score_comp = 0
- score_player = 0
- for i in range (l):
- n = int(input("put ur choice 1:rock , 2 : paper or 3:cissorz"))
- if (n == 1 and x == 1):
- print("NULL the computer choose",x)
- score_comp+1
- elif (n == 1 and x== 2):
- print("the computer win , he choose ",x)
- score_comp+=1
- elif (n == 1 and x == 3):
- print(player +"win bc the computer choose"+x)
- score_player+=1
- if (n == 2 and x == 1):
- print(player,"win bc the computer choose ",x)
- score_player+=1
- elif (n == 2 and x== 2):
- print("NULL the computer choose",x)
- elif (n == 2 and x == 3):
- print("computer win bc he choose ",x)
- score_comp+=1
- if (n == 3 and x == 1):
- print("computer win bc he choose ",x)
- score_comp+=1
- elif (n == 3 and x== 2):
- print(player,"win and the computer choose ",x)
- score_player+=1
- elif (n == 3 and x == 3):
- print("NULL the computer choose ",x)
- print("le score de ",player,"est : ",score_player)
- print("le score de l'oridnateur est : ",score_comp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement