This repository has been deprecated, but is being kept online to preserve course links.

For the latest content please see the repository at:
https://umd-ischool-inst326.github.io/inst326/

Background

Rock, paper, scissors is a game for two players. Each player chooses one of three hand shapes: rock, paper, or scissors. The players show each other their hand shapes at the same time. Rock defeats scissors; scissors defeats paper; paper defeats rock. If both players select the same hand shape, the round ends in a tie.

Instructions

Decide who will be the driver and who will be the navigator. The driver does the typing, while the navigator watches for errors and helps to plan ahead for the next steps. Drivers and navigators can switch roles as often as they would like throughout the pair programming session. Both driver and navigator should be focused on the programming task throughout the session.

Use Visual Studio Code to write a Python script called rps.py. At the top of the script, write a comment in which you list your full name and your partner’s full name.

In your script, ask the user to enter player 1’s hand shape ("r", "p", or "s") and player 2’s hand shape (same letters). Then determine the outcome of the round and print the appropriate string from the list below:

  • "Tie!"

  • "Player 1 wins!"

  • "Player 2 wins!"

Ask the user if they want to do another round (have them enter "y" for yes or "n" for no). Repeat the above steps until the user chooses not to do another round. When the user decides not to do another round, print "Goodbye!".

Submitting your script

If you finish your script during class, notify the instructional team member, who will look over your script with you and sign off on it if everything is in order.

Whether or not the instructional team member signed off on your script, at the end of the session, the driver should email a copy of the script to the navigator. If you did not complete the script during class time, you may complete the script together outside of class, or each of you may complete the script individually. It is not okay for one team member to complete the script for the other person without that person’s participation.

Both driver and navigator should upload the script to ELMS, even if the instructional team member has signed off on the script.