
-----------------------------------
devil2king
Tue Dec 02, 2008 12:27 am

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  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:)

-----------------------------------
Unforgiven
Tue Dec 02, 2008 12:28 am

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".

-----------------------------------
devil2king
Tue Dec 02, 2008 12:31 am

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.:), soo please, people try making, the program.

-----------------------------------
Tony
Tue Dec 02, 2008 12:39 am

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.

-----------------------------------
devil2king
Tue Dec 02, 2008 12:41 am

Re: A couple questions that i need help with... they are preety simple
-----------------------------------
could u possibly, give an example of that, plz

-----------------------------------
Unforgiven
Tue Dec 02, 2008 12:47 am

Re: A couple questions that i need help with... they are preety simple
-----------------------------------

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:


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.)


-----------------------------------
devil2king
Tue Dec 02, 2008 1:29 am

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.

-----------------------------------
Parker
Tue Dec 02, 2008 8:20 am

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.

var average : int

put "What is your average for school?"
get average

if average >= 80 then
put "You have an A, you are smart. "
elsif average < 80 then
put "You don't have an A yet. To get an A you need to get your mark up ", 80 - average, "%"
end if[/syntax]

-----------------------------------
devil2king
Wed Dec 03, 2008 1:10 am

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?

-----------------------------------
Parker
Wed Dec 03, 2008 8:26 am

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.

var answer : string

loop
    put "What day is December 25th?"
    get answer
    if answer = "Christmas" or answer = "Xmas" then
        put "Correct!"
        exit
    else
        put "Incorrect!"
    end if
end loop


-----------------------------------
Clayton
Wed Dec 03, 2008 10:17 am

RE:A couple questions that i need help with... they are preety simple
-----------------------------------
What day is December 25th?
cHristmas
Incorrect!
...

Watch out for those kinds of input ;)

-----------------------------------
Parker
Wed Dec 03, 2008 11:37 am

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

-----------------------------------
devil2king
Thu Dec 04, 2008 12:09 am

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

-----------------------------------
Tony
Thu Dec 04, 2008 12:47 am

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.

-----------------------------------
devil2king
Thu Dec 04, 2008 1:25 am

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! :(

-----------------------------------
Parker
Thu Dec 04, 2008 8:35 am

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. 

for decreasing i : 10..1
put i
delay(500)
cls
end for


Its pretty simple, I think that should help you.
