Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Assignment 3: If-Else Statements and Logical Operators

  1. Grade Classifier: Task: This program prompts the user to enter their exam score and then classifies their grade based on the score. Sample Output:

    Grade 1 - 30 = fail
    Grade 31 - 50 = C
    Grade 51 - 79 = B
    Grade 80 - 100 = A
    
    Enter your exam score: 85
    Your grade is B.
    
  2. Number Comparison: Task: This program prompts the user to enter two numbers and compares them to determine which one is greater or if they are equal. Sample Output:

    Enter the first number: 10
    Enter the second number: 15
    15 is greater than 10.
    
  3. Leap Year Checker: Task: This program prompts the user to enter a year and checks if it's a leap year or not. Sample Output:

    Enter a year: 2024
    2024 is a leap year.
    
  4. Number Sign Checker: Task: This program prompts the user to enter a number and determines whether it's positive, negative, or zero. Sample Output:

    Enter a number: -7
    -7 is a negative number.
    
  5. Vowel Checker: Task: This program prompts the user to enter a character and checks if it's a vowel or a consonant. Sample Output:

    Enter a character: a
    'a' is a vowel.
    
  6. Age Classifier: Task: This program prompts the user to enter their age and classifies them into different age groups. Sample Output:

    Enter your age: 17
    You are a teenager.
    
  7. Odd or Even Checker: Task: This program prompts the user to enter a number and determines whether it's odd or even. Sample Output:

    Enter a number: 6
    6 is an even number.