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

Question 1: Explain why programming is essential in today's world.

Provide at least three reasons to


support your answer.

Question 2: Write a Python program for an "All Temperature Calculator" that can convert temperatures
between Celsius, Fahrenheit, and Kelvin. The program should have the following functionalities:

1. Convert Celsius to Fahrenheit.

2. Convert Celsius to Kelvin.

3. Convert Fahrenheit to Celsius.

4. Convert Fahrenheit to Kelvin.

5. Convert Kelvin to Celsius.

6. Convert Kelvin to Fahrenheit.

Use the following conversion formulas:

- Celsius to Fahrenheit: \( F = (C \times 9/5) + 32 \)

- Celsius to Kelvin: \( K = C + 273.15 \)

- Fahrenheit to Celsius: \( C = (F - 32) \times 5/9 \)

- Fahrenheit to Kelvin: \( K = (F - 32) \times 5/9 + 273.15 \)

- Kelvin to Celsius: \( C = K - 273.15 \)

- Kelvin to Fahrenheit: \( F = (K - 273.15) \times 9/5 + 32 \)

Your program should prompt the user to enter the temperature and its unit (C, F, or K) and then display
the converted temperatures in all three units.

Question 3: Write a Python program to calculate the average of marks obtained by a student in five
subjects. Additionally, the program should determine the grade based on the average as follows:

Average >= 90: Grade A


Average >= 80 and < 90: Grade B
Average >= 70 and < 80: Grade C
Average >= 60 and < 70: Grade D
Average < 60: Grade F
The program should prompt the user to enter marks for each subject and then display the average and
grade for the student.

You might also like