What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » General Chit Chat » Web Geek Contest - W/ Prize

Web Geek Contest - W/ Prize
Author: Message:
thc2010
Full Member
***

Avatar
Revenge is a meal best served cold

Posts: 233
Reputation: 2
37 / Male / –
Joined: Oct 2004
O.P. Web Geek Contest - W/ Prize
Create a Secret Number Guessing Game Program


1.  Write Pseudocode for a JavaScript program that does the followin

•    Declares a random secret number between 1 and 10.
•    Allows the user to try and guess the secret number.  They are allowed as many guesses as they need to get it right.
•    Help them along by outputting information after each guess.
o    If their guess is too low, out put that “ (number they guessed) is too low.  Please try again.”
o    If their guess is too high, output that “(number they quessed is too high.  Please try again.”
o    If their guess is correct, output “You guessed it!”


2.  Now write the JavaScript Program using your pseudocode as a guide.

You have not yet learned how to generate random numbers so here is the code to declare a variable and then to generate a random number between 1 and 10 and assign it to the variable.

var randomValue;

randomValue = Math.floor (1 + Math.random () * 10);

note: 
•    you must use the proper lettercase -  M must be a capital letter or you will get logic errors

•    you will need to use the if / else selection structure and you will also need to use the while repetition structure in this program. 



------------

Prize:
All of the below
craftytv.com invite
30mb.com invite
gmail invite
web2messenger invite
webdp invite

How to win
Be the first to answer the correct code
[Image: glennlopez.png]
Click the image above to send me a message on MSN messenger via web browser.
12-01-2005 10:42 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Web Geek Contest - W/ Prize - by thc2010 on 12-01-2005 at 10:42 PM
RE: Web Geek Contest - W/ Prize - by Stigmata on 12-01-2005 at 10:47 PM
RE: Web Geek Contest - W/ Prize - by ShawnZ on 12-01-2005 at 10:53 PM
RE: Web Geek Contest - W/ Prize - by DJeX on 12-01-2005 at 11:06 PM
RE: Web Geek Contest - W/ Prize - by thc2010 on 12-02-2005 at 12:17 AM
RE: Web Geek Contest - W/ Prize - by wj on 12-02-2005 at 12:32 AM
RE: Web Geek Contest - W/ Prize - by ShawnZ on 12-02-2005 at 02:18 AM
RE: RE: Web Geek Contest - W/ Prize - by thc2010 on 12-02-2005 at 02:35 AM
RE: Web Geek Contest - W/ Prize - by ShawnZ on 12-02-2005 at 02:21 AM
RE: Web Geek Contest - W/ Prize - by surfichris on 12-02-2005 at 02:40 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On