Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- print("=========================================")
- print("Sasso Carta Forbice remastered for Python")
- print(" by NEGCommand & MRtecno98")
- print("=========================================")
- input(" Enter to start")
- print("\n\n\nInserire il numero di match(-1 per infinito)")
- bo = 1
- while bo == 1:
- try :
- ms = int(input(">>> "))
- except ValueError:
- print("Inserisci un numero, non una lettera")
- else:
- bo = 0
- while ms != 0:
- oggutente = input('\nInserisci un oggetto [Sasso|Carta|Forbice|Esci]: ')
- oggcomp = random.randint(1, 3)
- if "e" in oggutente or oggutente == "Esci" :
- break
- if oggutente == 'Sasso' or "s" in oggutente or "S" in oggutente or oggutente == "sasso":
- if oggcomp == 1:
- print('[Tu:Sasso ','Pc:'+'Sasso]',' PAREGGIO')
- elif oggcomp == 2:
- print('[Tu:Sasso ','Pc:'+'Carta]',' HAI PERSO')
- elif oggcomp == 3:
- print('[Tu:Sasso ','Pc:'+'Forbice]',' HAI VINTO')
- ms = ms - 1
- elif oggutente == 'Carta' or "c" in oggutente or "C" in oggutente or oggutente == "carta":
- if oggcomp == 1:
- print('[Tu:Carta ','Pc:'+'Sasso]',' HAI VINTO')
- elif oggcomp == 2:
- print('[Tu:Carta ','Pc:'+'Carta]',' PAREGGIO')
- elif oggcomp == 3:
- print('[Tu:Carta ','Pc:'+'Forbice]',' HAI PERSO')
- ms = ms - 1
- elif oggutente == 'Forbice' or "f" in oggutente or "F" in oggutente or oggutente == "forbice":
- if oggcomp == 1:
- print('[Tu:Forbice ','Pc:'+'Sasso]',' HAI PERSO')
- elif oggcomp == 2:
- print('[Tu:Forbice ','Pc:'+'Carta]',' HAI VINTO')
- elif oggcomp == 3:
- print('[Tu:Forbice ','Pc:'+'Forbice]',' PAREGGIO')
- ms = ms - 1
- else:
- print("Iserire un oggetto valido")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement