In Class Exercise: Pseudo – Flowchart

1) Draw a Flow Chart Using the following PseudoCode – draw a flow chart that illustrates the code: start open the dictionary while word not on page if word > last word on page turn the page forward else turn the page backward endif endwhile stop 2) Identify what is wrong with the following flowchart […]

Good Programming Design Notes

Naming Variables and Constants Give variables meaningful names Follow naming conventions Variables must be one word – no spaces Variables must start with a letter Use a different convention for constants – for example all capital letters. More on Modularization Main program can also be referred to as mainline logic Generally consists of: Housekeeping Tasks […]

Additional Algorithms for Practice

Write pseudocode for the logic of a program that allows the user to enter a number of dollars and convert it to Euros and to Japanese yen. Write pseudocode for the logic of a program that allows the user to enter values for a salesperson’s base salary, total sales, and commission rate. The program computes […]

Structured Programming Notes

Programming Models Older Programming Languages (assembly) Required programmers to work directly with memory addresses and machine language codes Older languages were written in one piece Not structured Newer Structured and Object-Oriented Languages More like natural language and use named variables instead of memory addresses Allow the development of smaller modules that are reusable and connectable […]

Flow Chart Worksheet

Draw a flowchart to represent the logic of a program that allows the user to enter a value for one edge of a cube. The program calculates the surface area of one side of the cube, the surface area of the cube, and its volume. The program outputs all the results. Draw a flowchart to […]

Variables and Constants Notes

Variables and Constants A variable is a named memory location that can vary. A named constant is assigned a value only once and cannot be changed. It is used to assign a useful name to a value that does not change, like pi. One can also use literal constants, like 2 in the previous example. […]

Pseudo-Code Worksheet

Write pseudocode to represent the logic of a program that allows the user to enter a value. The program divides the value by 2 and outputs the result. Write pseudocode to represent the logic of a program that allows the user to enter two values. The program outputs the product of the two values. Write pseudocode […]