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

CCCS 529 Selected Topics, Summer 2021

Assignment 03– Chapter 03,04,05


Due Wednesday 9 June 2021 10:20 am

All Assignments should be submitted via Black Board. Late submission will not be accepted.
You need to include the code and a sample run of your program in a single pdf file. Please
solve all questions as asked to get the full grades of the assignment.

1. Saudi Postal Company charges the following rates for shipping packages within the
kingdom.
Weight of Package Rate per Pound
1 kilogram or less SR 69
Over 1 kilogram but not more than 5 kilograms SR 99
Over 5 kilograms but not more than 10 kilograms SR 179
Over 10 kilograms SR 259

Write a program that asks the user to enter the weight of a package and then displays the
shipping charges.

2. Write a program that displays a table of the Celsius temperatures 0 through 20 and their
Fahrenheit equivalents. The formula for converting a temperature from Celsius
Fahrenheit is:
9
𝐹= 𝐶 + 32
5
where F is the Fahrenheit temperature and C is the Celsius temperature. Your program
must use a loop to display the table. Also, you must create a function that convert the
Celsius temperature to Fahrenheit (accept one parameter “Celsius temperature” and
return one output “Fahrenheit temperature”) and use this function in your program.

Good luck and enjoy coding. For any question, please contact me at sghanem@uj.edu.sa

You might also like