June 2021
Beginner
432 pages
9h 9m
English
In this version of the two-player hand game also known as Rochambeau or jan-ken-pon, the player faces off against the computer. You can pick either rock, paper, or scissors. Rock beats scissors, scissors beats paper, and paper beats rock. This program adds some brief pauses for suspense.
For a variation of this game, see Project 60, “Rock Paper Scissors (Always-Win Version).”
When you run rockpaperscissors.py, the output will look like this:
Rock, Paper, Scissors, by Al Sweigart al@inventwithpython.com - Rock beats scissors. - Paper beats rocks. - Scissors beats paper. 0 Wins, 0 Losses, 0 Ties ...Read now
Unlock full access