Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- print("Vamos a jugar: 'Piedra', 'Papel', 'Tijeras'.")
- RondasPer = 0
- RondasPC = 0
- for repeticiones in range(5):
- Puntuaciones = 0
- Jug = 0
- Maq = 0
- repeticiones = 3
- for repeticiones in range(3):
- jugador1 = input("Eliga una jugada: ")
- pc = random.choice(["Piedra", "Papel", "Tijeras"])
- if jugador1 == "Piedra" and pc == "Piedra":
- print("PC eligio Piedra: Empate")
- Puntuaciones = 0
- Rondas = 0
- if jugador1 == "Piedra" and pc == "Papel":
- print("PC eligio Papel: Gana PC")
- Puntuaciones = 2
- Rondas = 2
- elif jugador1 == "Piedra" and pc == "Tijeras":
- print("PC eligio Tijeras: Tu ganas")
- Puntuaciones = 1
- Rondas = 2
- if jugador1 == "Papel" and pc == "Piedra":
- print("PC eligio Piedra: Tu ganas")
- Puntuaciones = 1
- Rondas = 1
- elif jugador1 == "Papel" and pc == "Papel":
- print("PC eligio Papel: Empate")
- Puntuaciones = 0
- Rondas = 0
- elif jugador1 == "Papel" and pc == "Tijeras":
- print("PC eligio Tijeras: Gana PC")
- Puntuaciones = 2
- Rondas = 2
- if jugador1 == "Tijeras" and pc == "Piedra":
- print("PC eligio Piedras: Gana PC")
- Puntuaciones = 2
- Rondas = 2
- elif jugador1 == "Tijeras" and pc == "Papel":
- print("PC eligio Papel:Tu ganas")
- Puntuaciones = 1
- Rondas = 1
- elif jugador1 == "Tijeras" and pc == "Tijeras":
- print("PC eligio Tijeras: Empate")
- Puntuaciones = 0
- Rondas = 0
- print ("Puntuaciones: Ordenador",Maq, "Jugador",Jug)
- if Puntuaciones == 0:
- Jug += 0
- elif Puntuaciones == 0:
- Maq += 0
- if Puntuaciones == 1:
- Jug += 1
- elif Puntuaciones == 2:
- Maq += 1
- print ("Puntuaciones: PC",Maq, "Jugador",Jug)
- if Maq > Jug:
- print("¡¡PC Gana la Ronda!!")
- elif Jug > Maq:
- print("¡¡Haz ganado la Ronda!!")
- if Jug == Maq:
- print("Ronda empatada")
- if Rondas == 0:
- RondasPer += 0
- elif Rondas == 0:
- RondasPC += 0
- if Rondas == 1:
- RondasPer += 1
- elif Rondas == 2:
- RondasPC +=1
- if RondasPer == RondasPC:
- print("El Juegon termina en empate")
- elif RondasPer > RondasPC:
- print("Haz ganado el juego")
- if RondasPC > RondasPer:
- print("Haz perdido, PC gana el juego")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement