Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull into respository to update b.txt #62

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions client-a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,38 @@
# 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


//* 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


63 changes: 63 additions & 0 deletions client-b.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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


38 changes: 38 additions & 0 deletions client-c.txt
Original file line number Diff line number Diff line change
@@ -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
Empty file added ncode.pdf
Empty file.
Empty file added newcode.pdf
Empty file.