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

FHCT1022 PROGRAMMING CONCEPT

PRACTICAL 3

Develop a complete Python program for each question by using SELECTION


CONTROL Structure.

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

You might also like