Here is how a simple Python program implementing the game of Rock, Paper, Scissors can be expressed in one line. A user is allowed to input his choice, while the computer will randomly choose one of the three options. The computer then determines and declares a winner by comparing the user's choice and that of the computer; after all, standard rules for the game declare that Rock beats Scissors, Scissors beats Paper, and Paper beats Rock. The game will output the choices and the result (win, lose, or tie) if both happen to choose the same.
Here is how a simple Python program implementing the game of Rock, Paper, Scissors can be expressed in one line. A user is allowed to input his choice, while the computer will randomly choose one of the three options. The computer then determines and declares a winner by comparing the user's choice and that of the computer; after all, standard rules for the game declare that Rock beats Scissors, Scissors beats Paper, and Paper beats Rock. The game will output the choices and the result (win, lose, or tie) if both happen to choose the same.