Question 1 Nested If-Else Character Validation

Check Alphabet, Vowel, and Consonant

Write a Python program to take a single character as input. Using nested if-else statements, first check if it is an alphabet character; if it is, determine whether it is a vowel or a consonant. Otherwise, indicate that it is not an alphabet.

Solution Code Screenshot Click image to zoom
Alphabet Vowel Consonant Solution
Question 2 Nested If-Else Sorting Numbers

Arrange Three Numbers in Ascending Order

Write a Python program to take three numbers from the user and arrange them in ascending order using nested if-else decision statements.

Solution Code Screenshot Click image to zoom
Ascending Number Solution
Question 3 Nested If-Else Triangle Classification

Check if Sides Form a Triangle and Classify Type

Write a Python program to take three side lengths as input. First verify if a valid triangle can be formed using the triangle inequality theorem; if valid, use nested conditions to classify it as Equilateral, Isosceles, or Scalene.

Solution Code Screenshot Click image to zoom
Form Triangle and Type Solution
Question 4 Nested If-Else Division Safety

Zero Check and Divide Larger Number by Smaller

Write a Python program to read two numbers. Check whether neither number is zero to prevent division by zero; if valid, divide the larger number by the smaller number and display the quotient.

Solution Code Screenshot Click image to zoom
Divide Big with Small Solution
Question 5 Nested If-Else Angle Classification

Check Right, Acute, or Obtuse Angled Triangle

Write a Python program to input three sides of triangle check wheter it can from triangle if yes,check it is which triangle right angled triangle,acute angled triangle,obtuse angled triangle.

Solution Code Screenshot Click image to zoom
Right Acute Obtuse Triangle Solution
Solution Code Screenshot Click image to zoom
Right Acute Obtuse Triangle Solution
Solution Code Screenshot Click image to zoom
Right Acute Obtuse Triangle Solution
Question 6 Nested If-Else Special Number

Check Special Number or Not

Write a Python program to determine whether a given 2-digit number is a special two-digit number (where the sum of the digits plus the product of the digits equals the original number) using nested if-else checks.

Solution Code Screenshot Click image to zoom
Special Number Solution
Question 7 Nested If-Else Digits Analysis

Check if First and Last Digits are Even or Odd

Write a Python program to extract the first and last digits of a given number, and use nested if-else conditions to check whether both are even, both are odd, or one is even and the other is odd.

Solution Code Screenshot Click image to zoom
First Last Digit Even Odd Solution
Question 8 Nested If-Else Eligibility

Check Marriage Eligibility by Gender and Age

Write a Python program to input a person's gender ('M' or 'F') and age, and use nested if-else statements to determine if they are legally eligible for marriage (e.g., Male age ≥ 21, Female age ≥ 18).

Solution Code Screenshot Click image to zoom
Marriage Eligibility Solution
Question 9 Nested If-Else Decreasing Order

Print Three Alphabet Characters in Decreasing Order

Write a Python program to take three alphabet characters as input and display them in alphabetical decreasing order (reverse lexicographical) using nested if-else structures.

Solution Code Screenshot Click image to zoom
Alphabet Decreasing Order Solution
Question copied to clipboard!