Q1. Performance Grade
Write a Python program to accept a student's marks and display the corresponding grade.
| Marks | Grade |
|---|---|
| 90 and above | A |
| 75–89 | B |
| 60–74 | C |
| 40–59 | D |
| Below 40 | Needs Improvement |
Use if-elif-else to display the appropriate grade.
Grade 7 · Computer Science
Topic: Decision Making using if-elif-else
Read each programming question carefully and write your Python program in IDLE.
Use if-elif-else wherever required. Use suitable variable names, convert input values with int() or float() when necessary, and test your program with different values.
Work on the questions assigned by your teacher. The questions are grouped by challenge level.
Write a Python program to accept a student's marks and display the corresponding grade.
| Marks | Grade |
|---|---|
| 90 and above | A |
| 75–89 | B |
| 60–74 | C |
| 40–59 | D |
| Below 40 | Needs Improvement |
Use if-elif-else to display the appropriate grade.
Write a Python program to accept the temperature in Celsius and display the following message:
An online shopping company calculates delivery charges based on the order amount.
| Order amount (AED) | Delivery charge |
|---|---|
| 300 and above | Free |
| 200–299 | AED 5 |
| 100–199 | AED 10 |
| Below 100 | AED 15 |
Write a Python program to accept the order amount and display the delivery charge.
A household's monthly electricity consumption is classified as follows:
Write a Python program to accept the number of units consumed and display the appropriate category.
A school selects students for a programming competition based on their marks.
Write a Python program to accept a student's marks and display the selection status.
A shopping store offers discounts based on the total purchase amount.
| Purchase amount (AED) | Discount |
|---|---|
| 500 and above | 20% |
| 300–499 | 15% |
| 150–299 | 10% |
| Below 150 | No discount |
Write a Python program to:
if-elif-else.A smart water-monitoring system classifies household water consumption based on monthly usage and the number of people living in the household.
Use the following rules in the given order:
Write a Python program to accept monthly water consumption and the number of household members, then display the appropriate alert.
A digital wallet classifies a transaction based on the amount entered.
Write a Python program to accept a transaction amount and display the appropriate message.
A school awards achievement levels based on a student's marks and attendance.
| Condition | Achievement |
|---|---|
| Marks ≥ 90 AND attendance ≥ 95 | Outstanding |
| Marks ≥ 80 AND attendance ≥ 90 | Excellent |
| Marks ≥ 70 AND attendance ≥ 85 | Very Good |
| Marks ≥ 60 | Good |
| Otherwise | Needs Improvement |
Write a Python program to accept marks and attendance percentage and display the achievement level.
Use if-elif-else and logical operators where required.