Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+2 votes

I understand how to use the accumulator loop to add the points for each round, but I'm having trouble understanding how to determine who won the round.

asked in CSC201 Spring 2021 by (1 point)

2 Answers

+3 votes
 
Best answer

You can use "if and". For example:

if color1 == 'red' and color2 == 'blue':
    print(purple)

Use this with every combo of rock, paper and scissors.

answered by (1 point)
selected by
+1

And add 1 to accumulator for each winner
if computer won then
computer = computer + 1 in the if statement

+3 votes

In this case, you use the if, elif, and else statement,
so you do-
if the accumulator variable you used for the human is greater than computer, then print ...
elif the computer is greater than human, then print ...
else print its a tie

answered by (1 point)
...