CS205 Project One

.docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

205

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

3

Uploaded by CaptainSteelSeaUrchin27

Project One: Pseudocode Steps Angie Freeland Southern New Hampshire University CS 205: Foundations in Software Development Dr. Maciosek November 26, 2023
Project One: Pseudocode Steps 1. Start the game. 2. The program will initialize variables for userTotal, compTotal, tieTotal, and i, setting them all to zero. - userTotal will hold the number of wins for the user. - compTotal will hold the number of wins for the computer. - tieTotal will hold the number of ties between the user and the computer. - i will hold the number of iterations completed by the loop. 3. Establish a for loop to repeat the loop body steps ten times before breaking and proceeding to the next steps. 4. Within the loop body, prompt the user to input a choice of 1, 2, or 3, representing the user's symbol in the game. 1 represents rock, 2 represents paper, and 3 represents scissors. 5. Prompt the computer to enter a random number between 1 and 3, representing the computer's symbol in the game. 1 represents rock, 2 represents paper, and 3 represents scissors. 6. Compare the user input and the computer input. If they are equal, increment tieTotal by 1, display "The End...Tie Wins!" to output, increment i by 1, and proceed to the next loop iteration. If they are not equal, proceed to the next step. 7. Compare the user input and the computer input. If the user input is 1 and the computer input is 3, increment userTotal by 1, display "The End...You Win!" to output, increment i by 1, and proceed to the next loop iteration. If they are not equal, proceed to the next step.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help