Professional Documents
Culture Documents
Class exercise 5 07 2024
Class exercise 5 07 2024
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.’’