programming help...
Hey everyone...
I have a programming project that is due pretty soon, and I'm completely lost on it. (it's an intro to programming class). I'm not asking for anyone to do my homework for me...just asking for a little jump start in the logic of it. I've read the chapter on looping a few times and I'm still just confused as to where I can even start this....
If anyone is willing to help a starting programming I'd really appreciate it. I'm stumped on how to start. I've got ideas but I can't really put them to code.
Here is the assignment:
(If anyone is willing to help me on AIM, can you reply with your screen name so I can ask questions while I write this?)
Thank you so much if you can help...
In this project, you will be writing a guessing game for children. You will be using the random generator to generate an integer value between 1 - 100 inclusive. From there, the child will guess a value and your program will respond in one of three ways:
Too High!
Too Low!
Good guess!
You may choose the phrases you would like to use, but be certain it is appropriate and clear.
An example:
Welcome to the Guessing Game....(please expand this!)
Do you want to play? ( y or n ): y
I have a number between 1 and 100. Can you guess what it is?
Take a guess: 50
No - Too High!
Take a guess: 25
No - Too Low!
Take a guess: 35
No - Too Low!
Take a guess: 40
No - Too Low!
Take a guess: 45
No - Too High!
Take a guess: 44
That's it!!! Good guess! It took you 6 guesses.
Do you want to play again? ( y or n) : n
Thanks for playing!
Feel free to elaborate and expand, but be certain the user will know what is expected and how to play the game.
Rules of the Game (and project)
Be sure the user has answered the continue? questions correctly. Be sure to label how you want the user to respond (doesn't mean they will!).
Be sure the user places integer values in appropriate places. For example, you ask for a guess and the user enters NO, is inappropriate. Use the tools you have gleaned to correct this and allow the user to try again and again...
After 10 guesses, you can let the user know how to see the answer. For example: on the 11th attempt - Take a guess ( enter -99 to see the answer ): If they enter a guess, keep the game going resetting the counter back to 1. If the user presses -99, then display the answer and ask the user if they would like to start the game again. Again, you may choose how you would let the user stop or continue after every 10 guesses - just make it clear.
You'll need to use the random generator to obtain the intial guessing value. See srand time for example code sent to you via class mail.
Keep track of how many guesses the user has made per game. Display this value after a correct guess.
Inappropriate data means two things. First, you've asked for an integer value and have received character data. You know how to catch that type of error. Second, you've asked for an integer between 1 and 100 and the user types 5555 - that's a different type of error. You'll need to concern yourself with both types of errors correcting the error and allowing the user to try again (and again and again...).
I have a programming project that is due pretty soon, and I'm completely lost on it. (it's an intro to programming class). I'm not asking for anyone to do my homework for me...just asking for a little jump start in the logic of it. I've read the chapter on looping a few times and I'm still just confused as to where I can even start this....
If anyone is willing to help a starting programming I'd really appreciate it. I'm stumped on how to start. I've got ideas but I can't really put them to code.
Here is the assignment:
(If anyone is willing to help me on AIM, can you reply with your screen name so I can ask questions while I write this?)
Thank you so much if you can help...
In this project, you will be writing a guessing game for children. You will be using the random generator to generate an integer value between 1 - 100 inclusive. From there, the child will guess a value and your program will respond in one of three ways:
Too High!
Too Low!
Good guess!
You may choose the phrases you would like to use, but be certain it is appropriate and clear.
An example:
Welcome to the Guessing Game....(please expand this!)
Do you want to play? ( y or n ): y
I have a number between 1 and 100. Can you guess what it is?
Take a guess: 50
No - Too High!
Take a guess: 25
No - Too Low!
Take a guess: 35
No - Too Low!
Take a guess: 40
No - Too Low!
Take a guess: 45
No - Too High!
Take a guess: 44
That's it!!! Good guess! It took you 6 guesses.
Do you want to play again? ( y or n) : n
Thanks for playing!
Feel free to elaborate and expand, but be certain the user will know what is expected and how to play the game.
Rules of the Game (and project)
Be sure the user has answered the continue? questions correctly. Be sure to label how you want the user to respond (doesn't mean they will!).
Be sure the user places integer values in appropriate places. For example, you ask for a guess and the user enters NO, is inappropriate. Use the tools you have gleaned to correct this and allow the user to try again and again...
After 10 guesses, you can let the user know how to see the answer. For example: on the 11th attempt - Take a guess ( enter -99 to see the answer ): If they enter a guess, keep the game going resetting the counter back to 1. If the user presses -99, then display the answer and ask the user if they would like to start the game again. Again, you may choose how you would let the user stop or continue after every 10 guesses - just make it clear.
You'll need to use the random generator to obtain the intial guessing value. See srand time for example code sent to you via class mail.
Keep track of how many guesses the user has made per game. Display this value after a correct guess.
Inappropriate data means two things. First, you've asked for an integer value and have received character data. You know how to catch that type of error. Second, you've asked for an integer between 1 and 100 and the user types 5555 - that's a different type of error. You'll need to concern yourself with both types of errors correcting the error and allowing the user to try again (and again and again...).
