From 1d68ec247c26e5d63f243f71cff806ffdd611775 Mon Sep 17 00:00:00 2001 From: Patricia Date: Mon, 23 Sep 2024 22:49:44 -0400 Subject: [PATCH 1/3] client a --- client-a.txt | 24 ++++++++++++++++++++++++ ncode.pdf | Bin newcode.pdf | Bin 3 files changed, 24 insertions(+) create mode 100644 ncode.pdf create mode 100644 newcode.pdf diff --git a/client-a.txt b/client-a.txt index 09f6cf6..6c4fd92 100644 --- a/client-a.txt +++ b/client-a.txt @@ -2,3 +2,27 @@ # Add your pseudocode to this file below this line: # # ------------------------------------------------- # +WRITE PSEUDOCODE FOR A RANDOM NUMBER GUESSING GAME ASSIGNMENT + +START +Display a message inviting a player to play the game. + +Prompt the player to enter their first guess using a number between 1 and 10. + +Create a random number generator using numbers 1 through 10, including 1 and 10. +Next ask the number generator program to select a number between 1 and 10. + +Compare the number the player entered to the random number selected by the program. +If it is a match, print out 'Congrats! That is Correct! ' +Else, if it is not a match, print out, 'Sorry, that is not the number. Please enter the number for your second guess.' + +Compare the number the player entered to the random number selected by the program. +If it is a match, print out 'Congrats! That is Correct! ' +Else, if it is not a match, print out, 'Sorry, that is not the number. Please enter the number for your third guess.' + +Compare the number the player entered to the random number selected by the program. +If the third number is a match, print out 'Congrats! That is Correct! ' +Else, if it is not a match, print out, 'Sorry, you did not guess the number. Please play again.' + +Wait 30 seconds, then return to the Home Display page inviting the player to play. +END diff --git a/ncode.pdf b/ncode.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/newcode.pdf b/newcode.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 From b9a93e1b9e35620dfb3b96274871d7b38dd9e568 Mon Sep 17 00:00:00 2001 From: Patricia Date: Tue, 24 Sep 2024 23:50:50 -0400 Subject: [PATCH 2/3] Patricia Sullivan - commit then push Task C of Pseudocode assignment 9-24-2024 --- client-c.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/client-c.txt b/client-c.txt index d9a1860..0518050 100644 --- a/client-c.txt +++ b/client-c.txt @@ -1,4 +1,42 @@ # Client Task C # # Add your pseudocode to this file below this line: # # ------------------------------------------------- # +Patricia Sullivan +Task C: Product Package Counter +/* Task: You need to develop a program that counts the number of items that a hardware device scans to sort +/* for boxing packages into cases. Each package scanned is two (2) products. Each case can only fit 50 product packages. +/* Write a program that prints numbers from 2 to 50, counting by twos. + +Start +itemScancount = 0 +productCount = 0 +packageCount = 0 + +/* Create a function with a while loop named caseCount +function caseCount{ +while productCount > 0 and <= 50 { + print 'Package Count = ' + packageCount + print 'Product Count = ' + productCount + packageCount = itemScancount + itemScancount = itemScancount + 1 + productCount = productCount + 2 + } + } + +main { + call function caseCount { + + } + if productCount > 0 { + print 'Case is full. Start a new case.' + call function caseCount + } + else{ + print 'There are no more product packages' + } + } +End + + +/* Note - continute improving the program by adding in a variable and counter for cases to print the total number of cases From d5fc1a817b32c502cb478b4b579eefca137b2c78 Mon Sep 17 00:00:00 2001 From: Patricia Date: Thu, 3 Oct 2024 23:48:16 -0400 Subject: [PATCH 3/3] Pseudocode Redo for a.txt, b.txt, c.txt --- client-a.txt | 11 +++++++++ client-b.txt | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/client-a.txt b/client-a.txt index 6c4fd92..ae7bac0 100644 --- a/client-a.txt +++ b/client-a.txt @@ -26,3 +26,14 @@ Else, if it is not a match, print out, 'Sorry, you did not guess the number. Ple Wait 30 seconds, then return to the Home Display page inviting the player to play. END + + +//* could also create a function to use as many times as wanted using an if-then statement and +//* adding a counter to keep track of which guess it is +//* EX: Function start: if (num entered by player == num generated by generator), print "Congrats, you guessed it!" +//* Quit and reset for next game in 30 seconds. +//* esle {prompt for next guess +//* count = count + 1} +//* return + + diff --git a/client-b.txt b/client-b.txt index 991004f..ee56a9b 100644 --- a/client-b.txt +++ b/client-b.txt @@ -2,3 +2,66 @@ # Add your pseudocode to this file below this line: # # ------------------------------------------------- # +Start +//* Customer enters the store and approches the help mapping locator at station E. + +Prompt Customer "What can I help you find today?" + +Have the program search the database for the product and location of the product + +//* Starting from the help desk: +//* location A is North, then West +//* location B is North +//* location C is North, then East +//* location D is West +//* location E is HERE (no movement needed) +//* location F is East +//* location G is South, then West +//* location H is South +//* location I is South, then East + +switch(location) { + case 'locationA': + have customer walk North, then walk West: + break + + case 'locationB': + have customer walk North: + break + + case 'locationC': + have customer walk North, then walk East: + break + + case 'locationD': + have customer walk West: + break + + case 'locationE': + have customer No walking necessary, customer is here: + break + + case 'locationF': + have customer walk East: + break + + case 'locationG': + have customer walk South, then walk West: + break + + case 'locationH': + have customer walk South: + break + + case 'locationI': + have customer walk South, then walk East: + break + } + print "You have reached your destination!" + + //* if I was doing a real program I would add "where would you like to go next, if finished, please exit?" + //* if the customer entered a product or destination, the program would search for the location + //* Then the switch statement would be used again + //* I'd have the program continue until the customer chose exit, then have the program reset on the home page + + \ No newline at end of file