0% found this document useful (0 votes)
53 views1 page

Worksheet - Selection

This document provides 10 pseudocode problems involving conditional logic and calculations. The problems include: 1) calculating the product of two numbers if they are both over 10, 2) checking if a temperature is within an acceptable range, 3) checking eligibility for a high school, 4) calculating weekly lunch money for students under and over 15, 5) determining a winner in a house competition based on points, 6) calculating employee salary and bonuses, 7) calculating grades based on average marks, 8) calculating sales commission based on sales amount, and 9) building a basic calculator that performs addition, subtraction, multiplication or division based on the operator input.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views1 page

Worksheet - Selection

This document provides 10 pseudocode problems involving conditional logic and calculations. The problems include: 1) calculating the product of two numbers if they are both over 10, 2) checking if a temperature is within an acceptable range, 3) checking eligibility for a high school, 4) calculating weekly lunch money for students under and over 15, 5) determining a winner in a house competition based on points, 6) calculating employee salary and bonuses, 7) calculating grades based on average marks, 8) calculating sales commission based on sales amount, and 9) building a basic calculator that performs addition, subtraction, multiplication or division based on the operator input.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

PROGRAM DESIGN WORKSHEET 02

SELECTION
Write pseudocode algorithms to do the following :

1. Take in two numbers and if they are both greater than 10, find their product.
2. Determine if the temperature of the lab is in an appropriate range. Read the temperature, if it is
below 20 degrees then it is too cold, if it above 25 degrees then it is too hot.
3. Determine if a student can attend St Andrew High. The requirement is that the student be 11
years or older and female
4. Accept the weight of a person. If the weight is more than 160 lbs ask the person for their age. If
the age is less than 21 tell the user that they are way too young to be so fat; other wise give a
mild warning.
5. Calculate a students weekly lunch money based on the following rule: students under 15 years
of age get $1.00 times age per day; students 15 years and older get $1.50 times age per day.
6. For the Gartshore house competition design a program that given the name and number of
points earned by two houses will determine which of those two houses won the competition.
7. Calculate the salary for December for an employee. The employee has a flat monthly salary.
An end of year bonus of $5000 is added to the monthly salary if the employee was absent from
work for less then 5 days in the year. If the total salary (flat plus bonus) is more than $100,000
the employee has to pay a tax of 2.5%
8. Take in 3 marks for a student and find the average. The program should then use the following
criteria to say what grade the student got.
A
100 - 85
B
84 - 65
C
64 - 55
D
54 - 45
E
below 45
9. Calculate the salary for a salesman. Salesmen get a flat salary and then to that is added
commission. The commission is calculated as follows
if they made sales of between $0 and $5000 they get 2% of sales value in commission
if they made sales of over $5000 but below $10001 they get 5% of sales value in commission
if they made sales of $10001 or over they get 10% of sales value in commission
10. A program that acts as a simple calculator. This program takes in an operator. Then depending
on the operator it asks for the operands, performs the operation and gives the result. The valid
operators are
+ / and * . Two operands are sufficient.

You might also like