Enter human play (rock, paper, scissors): paper Computer plays rock. Paper covers rock. Human wins. Score: Human 1, Computer 0. Enter human play (rock, paper, scissors): scissors Computer plays scissors. Tie. Score: Human 1.5, Computer 0.5. Enter human play (rock, paper, scissors): scissors Computer plays rock. Rock crushes scissors. Computer wins. Score: Human 1.5, Computer 1.5.
set human score to 0.0 set computer score to 0.0 while true input human play with prompt choose random number from 0, 1, or 2 if random number is 0 set computer play to rock else if random number is 1 set computer play to paper else if random number is 2 set computer play to scissors end if human plays rock and computer plays rock Result is tie. Add 0.5 to each score. else if human plays rock and computer plays paper Result is computer wins. Add 1 to computer score. else if human plays rock and computer plays scissors Result is human wins. Add 1 to human score. else if human plays paper and computer plays rock Result is human wins. Add 1 to human score. else if human plays paper and computer plays paper Result is tie. Add 0.5 to each score. else if human plays paper and computer plays scissors Result is computer wins. Add 1 to computer score. else if human plays scissors and computer plays rock Result is computer wins. Add 1 to computer score. else if human plays scissors and computer plays paper Result is human wins. Add 1 to human score. else if human plays scissors and computer plays scissors Result is tie. Add 0.5 to each score. end display human score and computer score end