Unhuman
Who dares wins.
- Joined
- Apr 9, 2022
- Posts
- 9,961
- Reputation
- 11,027
Python:
# Project 1: Rock paper scissors#
import random
import numpy
PlayChoice = 0
ComChoice = 0
score = 0
RoundNo = int(input("Select the number of rounds: "))
for i in range(RoundNo):
PlayChoice = input(("Pick R Rock, Paper P, Scissors S: ")
mylist = ["R","P","S"]
ComChoice = random.choice(mylist)
#Rock variants
if PlayChoice == "R" and ComChoice == "R":
print ("We both chose Rock")
score += 0
elif PlayChoice == "R" and ComChoice == "P":
print ("I chose Rock, you win")
score += 1
elif PlayChoice == "R" and ComChoice == "S":
print ("I chose Rock, I win")
score -= 0
#Paper variants
elif PlayChoice == "P" and ComChoice == "R":
print ("I chose Paper, I win")
score -= 0
elif PlayChoice == "P" and ComChoice == "P":
print ("We both chose Paper")
score += 0
elif PlayChoice == "P" and ComChoice == "S":
print ("I chose Paper, you win")
score += 1
#Scissors variants
elif PlayChoice == "S" and ComChoice == "R":
print ("I chose Scissors, you win")
score += 1
elif PlayChoice == "S" and ComChoice == "P":
print ("I chose Scissors, lose win")
score -= 0
elif PlayChoice == "S" and ComChoice == "S":
print ("We both chose Scissors")
score += 0
else:
break
print("Game over, you won ",score,"/",RoundNo,".")
How to get good at this shit fellow niggacels?