Here is my first lab, this is actually what I turned in. I would like to know if their is any software that I can test it with. I would like to get better at pseudocode, but my teacher more or less refuses to help anyone.
start
perform housekeeping ()
while not eof
perform mainloop ()
endwhile
stop
housekeeping ()
num OrigPrice
num itemNum
num discount = 10%
num discountPrice
num day=0
string description
string Header = “Rose’s Secondhand Resale Shop”
string ColHead= “Original Price Item Number Description Day Discount Price”
Print Header
Print ColHead
get origPrice, itemNum, description
return
mainloop()
day = 1
while day =1
Print origPrice, itemNum, description, day, discountPrice
while day < 7
discountPrice = discountPrice – (discount * discountPrice)
Print origPrice, itemNum, description, day, discountPrice
day = day +1
endwhile
endwhile
get origPrice, itemNum, description
return
Thanks in advance for taking time to read this and send me an some sort of direction.
How to test PseudocodeTesting pseudocode and understanding where you went wrong
Page 1 of 1
6 Replies - 77340 Views - Last Post: 20 April 2009 - 04:01 PM
Replies To: How to test Pseudocode
#2
Re: How to test Pseudocode
Posted 16 March 2009 - 08:37 PM
It is impossible to "Test" Pseudocode, other than by hand, and if you could. It wouldn't exactly be Pseudocode.
Pseudocode is simply programming but in plain english, so the best way to test it is to understand what is going on and run though it line by line.
this may be more along the lines of what an educator wants:
but in reality there is no "Wrong" way of doing pseudocode, just the way the prof wants it...
Try searching google for the "Proper" way or his way and try to mimic it.
Pseudocode is simply programming but in plain english, so the best way to test it is to understand what is going on and run though it line by line.
this may be more along the lines of what an educator wants:
Start Initialize X variable Set X equal to 1 Loop from X to 100 and Print out X End
but in reality there is no "Wrong" way of doing pseudocode, just the way the prof wants it...
Try searching google for the "Proper" way or his way and try to mimic it.
This post has been edited by krum110487: 16 March 2009 - 08:39 PM
#3
Re: How to test Pseudocode
Posted 16 March 2009 - 08:41 PM
krum110487, on 16 Mar, 2009 - 07:37 PM, said:
It is impossible to "Test" Pseudocode, other than by hand, and if you could. It wouldn't exactly be Pseudocode.
Pseudocode is simply programming but in plain english, so the best way to test it is to understand what is going on and run though it line by line.
this may be more along the lines of what an educator wants:
but in reality there is no "Wrong" way of doing pseudocode, just the way the prof wants it...
Try searching google for the "Proper" way or his way and try to mimic it.
Pseudocode is simply programming but in plain english, so the best way to test it is to understand what is going on and run though it line by line.
this may be more along the lines of what an educator wants:
Start Initialize X variable Set X equal to 1 Loop from X to 100 and Print out X End
but in reality there is no "Wrong" way of doing pseudocode, just the way the prof wants it...
Try searching google for the "Proper" way or his way and try to mimic it.
Thanks for your input, I see now what you mean that it wouldn't be pseudcode if you could test it.
#4
Re: How to test Pseudocode
Posted 16 March 2009 - 10:14 PM
You could always mock up a quick, small program to "run some numbers".
#5
Re: How to test Pseudocode
Posted 17 March 2009 - 02:35 AM
Pseudocode by definition is a pretty free format. The only real way to "test" a pseudocode would be to dry-run it by hand which has some limitations of human prone errors.
Try to see what real programming language most resembles the pseudocode you write and convert it into a legal program. Running it through a legal compiler would solve your problem then. Kinda.
Try to see what real programming language most resembles the pseudocode you write and convert it into a legal program. Running it through a legal compiler would solve your problem then. Kinda.
#6
Re: How to test Pseudocode
Posted 17 March 2009 - 09:36 PM
Thanks everyone, I appreciate your time. For the time being I will just keep rockin pseudocode, this summer I will be in my first Java class. As far as I have researched, I think I will have a better understanding once I have put all of this with a language. I had asked my teacher about this and she said no that is a horrible way to learn it, funny how that is how Standford teaches it (with a language). They teach the intro/basics along with Java. Not saying that they are right, but its a hell of a lot better school than I am at!!! Again Thanks!!!
#7
Re: How to test Pseudocode
Posted 20 April 2009 - 04:01 PM
Check out the links in my replay at the end of this post http://www.dreaminco...h...c=99885&hl=
It may help you understand pseudo code at bit more. I recommend you start learning Java or even C++.
When you hear... you forget. When you see... you remember. When you do... you understand
It may help you understand pseudo code at bit more. I recommend you start learning Java or even C++.
When you hear... you forget. When you see... you remember. When you do... you understand
Page 1 of 1

New Topic/Question
Reply



MultiQuote





|