Programming Fundamentals/Introduction/Writing Pseudocode
Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm. This activity introduces basic pseudocode concepts and how to put them together to represent the steps to complete a simple task. This activity will help you understand pseudocode and how to use it in the program planning process.
- Understand basic pseudocode concepts.
- Select a set of terms to use when writing pseudocode for programming.
- Review Wikipedia: Pseudocode.
Review the following pseudocode example.
... This program displays "Hello world!" Function Main Output "Hello world!" End
- What symbol is used to indicate annotations or comments?
- What word is used to indicate the beginning of a program?
- What word is used to indicate the end of a program?
- What word is used to indicate output?
- How are sequencing and indenting used in pseudocode?
- What capitalization and punctuation rules are followed?
- What word should be used to indicate input?
- What word should be used to indicate a process or calculation?
- What word should be used to indicate a decision or choice?
- What software applications are available to help create pseudocode?
With a partner, consider the following scenario: Assume you are sitting in a classroom. You are directing your partner to write your name on the board in the front of the classroom and then return to their seat.
What steps are necessary to make this happen? Write pseudocode that documents the steps. Compare your pseudocode with your partner's pseudocode. Discuss any differences and make adjustments, if necessary.
- Consider how pseudocode may be used in the program planning and documentation process.
- Identify specific steps you will want to take when planning and writing computer programs.
- Discuss your activity experience with your classmates. What surprised you? What have you learned that you can apply to your own school or work environment?