PDA

View Full Version : Pseudocode help


cold
04-21-2010, 11:14 AM
Hi everyone

I am really new to programming and to be honest I struggle a lot.

Anyway, I have a class exercise that I need to do by next week. The problem is that I don't know how to write it. It will probably seem VERY simple to everyone on here, but please remember I am a noob :(

Anyway,

What I have to do is write pseudocode/algorithm for a scenario.

I understand that I need to use a 5 step process for it but I don't know how to turn it into pseudocode.

This is the scenario (there are 3 from memory that I need to do this is just one)

"you need to know the cost of sending a parcel to someone. the price of sending the item will depend upon its weight. the postal service has a standard charge per kilo of item weight."

I know I need to break it down into inputs, outputs and processes? I think that's right, but I'm struggling with writing it and getting it started.

I don't need to use any actual code for the exercise. I just have to do the pseudocode and a flow chart for each scenario.

If someone could help me with this scenario I'd be really, really grateful.

Thanks heaps

Fou-Lu
04-21-2010, 03:05 PM
What do you have so far? We are very limited in what can be provided since this is a school assignment (and we don't want you to get hit on plagurism).
You're correct, I/O and process is the skeleton of the psuedo code. In this case, the I/O is quite simple; you need a weight, and you tell a price. Process is also quite simple, multiplying the weight by the price-per-kilo. This algorithm will not need any loops or subprocesses. I cannot get you started on this since to do that would be to actually give you the full pseudocode; it will take only 5 lines to create this plus any 'start' and 'end' indicators you may use.
Also, I don't really consider this to be a server side issue, so I'll move it to computer programming instead.