National+4+AVU+Pseudocode+task

An [|algorithm] is a series of steps required to solve a problem.

For example, an algorithm for baking a cake might be:



We use algorithms in this way to help design the steps of a computer program.

Pseudocode
[|Pseudocode] is an outline of a program written in a way that it can be easily converted into a computer programming language.

**Task**

 * Implement the scratch program using the following pieces of pseudocode **

** Program 1 **
1. set yes_votes to 89

2. set no_votes to to 16

3. total_votes = yes_votes + no_votes

4. display total_votes

** Program 2 **
1. ask user for juice_cost_price

2. ask user for juice_sale_price

3. ask user for cans_sold

4. unit_profit = juice_sale_price - juice_cost_price

5. total_profit = unit_profit x cans_sold

6. display total_profit


 * // Design the pseudocode for the following pieces of programming script. // **

** Program 3 **



 * Program 4 **