0% found this document useful (0 votes)
20 views2 pages

O-Level - Worksheet 1

The document provides tasks for writing programs to calculate surface area of a rectangular garden from length and width, convert Fahrenheit to Celsius, check if temperature is below freezing, and output the month name from a number between 1 and 12.

Uploaded by

Abdul Hayee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

O-Level - Worksheet 1

The document provides tasks for writing programs to calculate surface area of a rectangular garden from length and width, convert Fahrenheit to Celsius, check if temperature is below freezing, and output the month name from a number between 1 and 12.

Uploaded by

Abdul Hayee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

A1 - Worksheet 1

Write code for the following tasks:

1. Write a program to take as input the length and width of a rectangular garden. The
program is to calculate and output the surface area.

2. Write a program to take as input a temperature in degrees Fahrenheit. The program is


to convert and output the temperature in degrees Celsius (Hint: DegreesC = (DegreesF
– 32) * 5/9)

Page 1 of 2
3. Write a program to take as input air temperature in degrees Celsius. The program is to
output a message to say whether it is freezing (below 1 degree) or not.

4. Write a program to take as input an integer between 1 and 12 (inclusive). The program
is to output the name of the month corresponding to the number input. For example, an
input of 2 will output ‘February’.

Page 2 of 2

You might also like