Professional Documents
Culture Documents
Fhct1022 Programming Concept Practical 3 Develop A Complete Python Program For Each Question by Using SELECTION CONTROL Structure
Fhct1022 Programming Concept Practical 3 Develop A Complete Python Program For Each Question by Using SELECTION CONTROL Structure
PRACTICAL 3
1. Write a program that will receive two integer items from a terminal operator, and
display to the screen their sum, difference, product and quotient. Note that the
quotient calculation (first integer divided by second integer) is only being
performed if the second integer does not equal zero.
2. Write a program that reads an employee’s number, hours worked, and hourly rate
and calculates his or her wages. All hours over 40 are paid at 1.5 times the regular
hourly rate. An extra bonus RM200 will be given to those who worked more than
100 hours in total.
3. An Admission charge for The Little Rep Theater varies according to the age of
the person. Develop a program to print out the ticket charge given the age of the
person. The charges are as follows:
Age Fee
>55 RM7
13-55 RM10
3-12 RM5
<3 Free