Page 148 - 2622_Delhi Police Public School_C-7
P. 148
Explore in the Lab 21 st Century #Critical Thinking
Skills
#Technology Literacy
To
Subject Writing Programs
Go to your computer lab & write program to:
a. display a menu with different food items and their prices. Ask the user to select an item from the menu
by entering its corresponding number. Using conditional statements, calculate the total bill based on the
selected item and quantity.
b. calculate the total price after applying discounts. Ask the user to enter the price and the discount
percentage. If the discount percentage is greater than 25%, display a message indicating that the discount
is not valid.
c. convert the temperature from Celsius to Fahrenheit. Take the temperature as input from the user.
Determine if the temperature is below freezing (0°C) or not. Display the appropriate message with the
converted temperature.
d. calculate the area of a square or circle according to the input given by the user. If the input is 1, then
calculate the area of a square, otherwise find the area of a circle. Ask the user to input the values for
square or circle based on the input.
For The Teacher
Discuss all the topics covered in this chapter with the students.
Tell the students, how to use indentation to define the body of the conditional statement.
Premium Edition-VII
146

