Zebra0

Learn to Program Step-by-Step

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

Like us on Facebook:


OER: Open Educational Resource
Creative Commons License Author: Janet E. Joy; Publisher: Zebra0.com
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Creative Commons Attribution-NonCommercial 4.0 International License
Last modified: January 08 2016 10:54:04.