Brainstorming 01: Conditional Statements

Questions are based on Conditional Statements : 


  1. Write a Python program to determine whether a given number is even or odd.

  2. Write a Python program to find the largest of three numbers.

  3. Write a Python program to calculate a student's grade based on their percentage.

  4. Write a Python program to check if a person is eligible to vote based on their age.

  5. Write a Python program to determine whether a given number is positive, negative, or zero.

  6. Write a Python program to classify a triangle as equilateral, isosceles, or scalene based on its side lengths.

  7. Write a Python program to determine if a given year is a leap year.

  8.  Write a Python program to calculate the profit or loss based on the cost price and selling price of a product.

  9. Write a Python program to calculate the total amount to be paid after applying a discount based on the purchase amount.

  10. Write a Python program to check if a number is divisible by both 3 and 5.

  11. Write a Python program to determine whether a given character is a vowel or a consonant.

  12. Write a Python program to find the roots of a quadratic equation using conditional statements to handle different cases (real, imaginary, equal roots).

  13. Write a simple calculator using conditional statements to perform different arithmetic operations based on user input.

  14. Write a Python program to convert temperature between Celsius and Fahrenheit using conditional statements.

  15. Write a Python program to print three numbers in ascending order. 
Previous Post Next Post