Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Class exercise due Thursday 11 July 2024

Students are required to work in groups of 10.


The group leader must submit 1 solution per group to
kkoranteng@wsu.ac.za

For each of the following questions write an algorithm, pseudocode and draw a
flowchart.

1. Write a python program that asks the user to enter three numbers from a
keyboard, then calculate and display the sum, average, product of the three
numbers.

2. Write a python program which will ask the user to input two numbers. calculate
and display the sum of the numbers and the difference between the first and
second number.

3. Write a a python program which will ask the user to input two prices and then add
them together. If the total is greater than 100 then 10% discount must be
subtracted from the total. The final total (after discount) must be displayed.

4. write a python program to calculate and display a student’s final mark. The
program should accept the student’s year mark and exam mark. The final mark is
the sum of 40% of the year mark and 60% of the exam mark. If the final mark is
greater than or equal to 50, display the message “PASS”. if the final mark less
than 50, display is ‘’FAIL.’’

You might also like