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

Update client-a.txt #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
16 changes: 16 additions & 0 deletions client-a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,19 @@
# Add your pseudocode to this file below this line: #
# ------------------------------------------------- #

START
SET randomNumber = RANDOM(1, 10)
SET attempts = 0
FOR (attempts = 0; attempts <3; attempts+=1)
{
PRINT "Guess a number between 1 and 10:"
INPUT playerGuess
IF playerGuess == randomNumber:
PRINT "Correct! You win!"
EXIT
ELSE IF playerGuess < randomNumber:
PRINT "Too low!"
ELSE: PRINT "Too high!"
}
PRINT "Game over! The correct number was", randomNumber
END