> Quite BASIC
>
Welcome to the clubhouse!
User login
Username:
*
Password:
*
Create new account
Request new password
Navigation
Quite BASIC
Blog
Projects
Help
Forums
Guess a random number between 0 and 10 - with hints and score
Posted
October 4th, 2008
by
pine
Your vote:
Current rating:
1
2
3
4
5
Category
Description
>> See More projects by pine
Level
>> Open this project at the main Quite BASIC Page
20 LET n=ROUND(RAND(10)) 25 REM the variable s keeps track of the number of guesses - the "score." 27 REM we start with s as 1, and increase it by 1 for each bad guess 28 LET s=1 30 input "what's your guess? "; g 40 if g=n then GOTO 60 41 if g<n then print "oops! You guessed too low, try again!" 42 if g>n then print "oops! You guessed too high, try again!" 44 REM here is where we increase the score s by one. "=" means "assign the value, not "is equal to." 45 LET s=s+1 50 goto 30 60 print "You guessed in "; s; " guesses" 70 end
Login
or
register
to post comments
Popular Projects
Trebuchet II
New version with a mini story plus the popups are gone (yay!). And watch out for the dragon! The popup is replaced by pressing +/- to change the angle and pressing 1-9 to set the force.
Pong with Scoring
A version of the Ping Pong game that keeps the score
Snake Skin
A variant of the Snake game but with a snake skin that moves.
Countries Hangman
A version of the Hangman game where the words are all countries
Tool Name Hangman
A version of the Hangman game for tools.
more
Who's online
There are currently
0 users
and
0 guests
online.
Who's new
piggles
pine
RAFAEL ROMERO
almhath
miken
Active forum topics
Members
LANGUAGE LEARNINGS
ERRORS
more
New forum topics
LANGUAGE LEARNINGS
ERRORS
Members
more