June 2021
Beginner
432 pages
9h 9m
English
This variant of Rock Paper Scissors is identical to Project 59, “Rock Paper Scissors,” except the player will always win. The code selecting the computer’s move is set so that it always chooses the losing move. You can offer this game to your friends, who may be excited when they win . . . at first. See how long it takes before they catch on to the fact that the game is rigged in their favor.
When you run rockpaperscissorsalwayswin.py, the output will look like this:
Rock, Paper, Scissors, by Al Sweigart al@inventwithpython.com - Rock beats scissors. - Paper beats rocks. ...Read now
Unlock full access