Computer Science Canada A couple questions that i need help with... they are preety simple |
| Author: | devil2king [ Tue Dec 02, 2008 12:27 am ] |
| Post subject: | A couple questions that i need help with... they are preety simple |
-please, answer as many as you can, this. or please give me examples or similar, questions, with this 1. Creates a program that asks for a number and depending on the value entered, prints POSITIVE,NEGATIVE,or ZERO. This program should continue until the value 100 is entered. 2. Write a program that asks users to enter their age. IF the age is eighteen or more, the program should print OLD ENOUGH TO VOTE. Otherwise, is should print the number of years before voting is possible, eg,. WAIT 4 YEARS TO VOTE. (Hint: 18 years minus the age entered will tell you how many years to wait.) 3. Create a program that ask for the capital of canada. If the aswer is incorrect, the program should ask the question again. If the answer is correct (Ottawa), then the program should exit the loop, print [b]correct and stop. 4.Write a program that asks the user to enter the plural of the work SHEEP. If the answer is sheep, a congratulaotry message should be printed and the program should end. Otherwise, the question should be asked again until the correct asnwer is entered. 5. Create a program that asks the user if they are ready to BLAST OFF. The user should be in structed to asnwer yes or no. If the word answered is yer, then the numbers from 10 down to 1 should be printed by ones and the BLAST OFF should be printed, The program should then end. If the word entered is no, then MISSION DELAYED should be printed. For any other words, the reminder PLEASE ENTER YES OR NO should be printed, and the question asked again. 6. Prepare a bill for someone eating luch in a fask food restaurant. If the meal costs less then $4.00, tax is not charded. However, if the meal costs more than $4.00, tax is charged at 7% Hint:meal with tax:meal + (mral* .07) -thx for the help, this site is awesome:) |
|
| Author: | Unforgiven [ Tue Dec 02, 2008 12:28 am ] |
| Post subject: | RE:A couple questions that i need help with... they are preety simple |
Sounds a lot more like "do my homework" than "I have some questions". |
|
| Author: | devil2king [ Tue Dec 02, 2008 12:31 am ] |
| Post subject: | Re: A couple questions that i need help with... they are preety simple |
aha no, this is a set of questions i made, which i want, people begginers, like me to be challenged, so just want people to answer, to see if they are hard enough, and yes it is for school. |
|
| Author: | Tony [ Tue Dec 02, 2008 12:39 am ] |
| Post subject: | RE:A couple questions that i need help with... they are preety simple |
perhaps you might want to consider asking for more than a single if statement. |
|
| Author: | devil2king [ Tue Dec 02, 2008 12:41 am ] |
| Post subject: | Re: A couple questions that i need help with... they are preety simple |
could u possibly, give an example of that, plz |
|
| Author: | Unforgiven [ Tue Dec 02, 2008 12:47 am ] |
| Post subject: | Re: A couple questions that i need help with... they are preety simple |
devil2king wrote: could u possibly, give an example of that, plz Sure. This is an example of a question that is only asking for a single if statement: devil2king @ Tue Dec 02, 2008 12:27 am wrote: 2. Write a program that asks users to enter their age. IF the age is eighteen or more, the program should print OLD ENOUGH TO VOTE. Otherwise, is should print the number of years before voting is possible, eg,. WAIT 4 YEARS TO VOTE. (Hint: 18 years minus the age entered will tell you how many years to wait.) |
|
| Author: | devil2king [ Tue Dec 02, 2008 1:29 am ] |
| Post subject: | Re: A couple questions that i need help with... they are preety simple |
doesnt really, answer, can u give an example, that i could enter into turing plz. |
|
| Author: | Parker [ Tue Dec 02, 2008 8:20 am ] | ||
| Post subject: | RE:A couple questions that i need help with... they are preety simple | ||
You continue to ask for an example which sounds like you just want a code to hand into your teaacher but..I will give some sort of an example that may help you.
|
|||
| Author: | devil2king [ Wed Dec 03, 2008 1:10 am ] |
| Post subject: | Re: A couple questions that i need help with... they are preety simple |
thx thats what i was looking for, hmm, what about the other questions though i tired, could anyone help me with number 3? |
|
| Author: | Parker [ Wed Dec 03, 2008 8:26 am ] | ||
| Post subject: | Re: A couple questions that i need help with... they are preety simple | ||
Here is an example for number 3. I will not be posting any other very specific examples as using these you should also be able to figure out the other questions with a bit of guiding. Hope this one helps you.
|
|||
| Author: | Clayton [ Wed Dec 03, 2008 10:17 am ] |
| Post subject: | RE:A couple questions that i need help with... they are preety simple |
Program Input wrote: What day is December 25th?
cHristmas Incorrect! ... Watch out for those kinds of input |
|
| Author: | Parker [ Wed Dec 03, 2008 11:37 am ] |
| Post subject: | RE:A couple questions that i need help with... they are preety simple |
I thought about that but..it wasnt my program and just an example. This will also make him do more than just change the words in the code I made. I dont want to be doing his homework :O |
|
| Author: | devil2king [ Thu Dec 04, 2008 12:09 am ] |
| Post subject: | Re: A couple questions that i need help with... they are preety simple |
k thx tat helped, and no, i dont want the answers, to it. can someone help with number 5, sicne its a little different, and dont, put any specifec examples, cuz i need to understand this |
|
| Author: | Tony [ Thu Dec 04, 2008 12:47 am ] |
| Post subject: | RE:A couple questions that i need help with... they are preety simple |
The only new thing is the use of a for loop -- look into how that can be used. |
|
| Author: | devil2king [ Thu Dec 04, 2008 1:25 am ] |
| Post subject: | Re: A couple questions that i need help with... they are preety simple |
ok but.. where would i put the countdown? and where?ugggh i dont get it! |
|
| Author: | Parker [ Thu Dec 04, 2008 8:35 am ] | ||
| Post subject: | Re: A couple questions that i need help with... they are preety simple | ||
I am assuming you know what to do for the if statements for number 5 but the for loop is the part you are having trouble with. Here is a simple countdown using a for loop.
Its pretty simple, I think that should help you. |
|||