Unit 2 Task 25: Rock, paper, scissors - first to three

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Unit 2 Task 25 - Rock, paper, scissors - first to three

← Unit 2 tasks · Solution


Play Rock, Paper, Scissors against the computer until either side wins 3 rounds.

Print scores after each round. When someone reaches 3 wins, print who won the match.

Skills: while, nested if, random, string inputs.

Note: Keep input validation simple (assume user types r, p, or s if you want; or re-prompt on bad letters).