
-----------------------------------
VB3CK
Tue Feb 24, 2009 3:04 pm

number game
-----------------------------------
Ok I got this question or homework
And I got no clue What to do

8.	Create a small game where you instruct person 1 to enter a number between 1 and 10.  Then ask the second user to guess the number.  You should tell the user that they were either too high, too low, or got it.

-----------------------------------
BigBear
Tue Feb 24, 2009 4:11 pm

Re: number game
-----------------------------------
Just break down what is asked. Also you should have posted some code to see what area you need help with. 

You only need to use put, get and maybe if statements

-----------------------------------
andrew.
Tue Feb 24, 2009 4:16 pm

RE:number game
-----------------------------------
Let's break it down:
1. Get a number
2. Get another number
3. Check if the number is high, low, or right

Doesn't seem too hard once you break it down, eh?

-----------------------------------
saltpro15
Tue Feb 24, 2009 4:17 pm

Re: number game
-----------------------------------
now this is the ONLY time I will ever do this

Code Removed

next time, post some code and we'll try to help you


Mod Edit: Why are you just giving him the solution?

-----------------------------------
andrew.
Tue Feb 24, 2009 4:19 pm

Re: number game
-----------------------------------
now this is the ONLY time I will ever do this

Code Removed

next time, post some code and we'll try to help youMod Edit: Removing code that is of no need

-----------------------------------
saltpro15
Tue Feb 24, 2009 4:24 pm

RE:number game
-----------------------------------
guess 2 i forgot to delete, and the delay is just style lol

-----------------------------------
saltpro15
Tue Feb 24, 2009 4:27 pm

RE:number game
-----------------------------------
@ mod
so he can learn, other people's code is the only way I ever learned, if he hands it in well he's only hurting himself, I don't care

-----------------------------------
Tony
Tue Feb 24, 2009 4:28 pm

RE:number game
-----------------------------------
hey guys, lets review

Do not post full solutions to homework assignments.

-----------------------------------
saltpro15
Tue Feb 24, 2009 4:28 pm

RE:number game
-----------------------------------
sorry Tony :oops:  won't happen again

-----------------------------------
Tony
Tue Feb 24, 2009 4:30 pm

Re: RE:number game
-----------------------------------
@ mod
so he can learn, other people's code is the only way I ever learned
There was enough "code" posted to figure the problem out by andrew
Let's break it down:
1. Get a number
2. Get another number
3. Check if the number is high, low, or right

Edit: that is, andrew's reply is the expected response. If there are more problems (like "what syntax do I use to get user input?"), then such should be asked in follow-up questions.

-----------------------------------
Insectoid
Tue Feb 24, 2009 5:49 pm

RE:number game
-----------------------------------
First of all, get the first number.


get num1


then, get the second.


get num1
get num2


then, use the greater than/less than/equal too operators (>,  that then
    %do stuff
elsif this < that then
    %do something else
else
    %do something else
end if


-----------------------------------
VB3CK
Wed Feb 25, 2009 9:58 am

RE:number game
-----------------------------------
thank you all for your help!

Yep it's easier if you break it down like posters said above.

And thanks insectoid for the hint.

THis was easier than I thought
