Fish in Pond Pseudocode
Fish in Pond Calculation Pseudo-code
Pseudo-code for the fish in pond problem:
Input markedFish
Input sample
Input sampleMarked
fish = markedFish*sample/sampleMarked
Output fish
- It is “user friendly” to ask for information in the order that it is gathered, or in the order that it is usually asked. (Imagine the errors that would occur if a form asked for the zip code first, then the state.)
- Most programs have a pattern of input, calculate, output. The program is easier to read if we input all of the information and then do all of the calculations, but sometimes a program must do some calculations before asking the user for more information.
We can now write the program