if elif else python test quiz solve
if elif else python test quiz solve
Write a program that asks the user to enter their age and determines whether they are a child,
teenager, adult, or senior citizen.
2. Create a program that prompts the user to enter a grade from 0 to 100 and then prints a
corresponding letter grade using the following scale: 90-100 (A), 80-89 (B), 70-79 (C), 60-69 (D),
below 60 (F).
3. Write a program that takes three numbers as input and finds the largest among them using if, elif,
and else statements.
4. Create a program that asks the user to enter a month number (1-12) and prints the corresponding
month name. Handle invalid inputs with an appropriate error message.
5. Write a program that prompts the user to enter a year and checks if it is a leap year or not. Display
an appropriate message.
6. Create a program that determines whether a given number is even or odd. If the number is
divisible by 4, print a different message.
7. Write a program that asks the user to enter a password. If the password matches a predefined
secret password, display a success message. Otherwise, inform the user that the password is
incorrect.
8. Create a program that takes a user's height (in feet and inches) and weight (in pounds) as input,
and calculates their body mass index (BMI) using the following formula: BMI = (weight / (height *
height)) * 703. Display the BMI along with the corresponding weight category (e.g., underweight,
normal weight, overweight, obese).
9. Write a program that simulates a simple game of rock, paper, scissors. Prompt the user for their
choice and randomly generate a choice for the computer. Determine the winner and display the
result.
10. Create a program that asks the user to enter their income. Based on their income, calculate and
display the amount of tax they need to pay using different tax brackets.