0% found this document useful (0 votes)
21 views4 pages

Even or Odd Number Checker

The document outlines a series of programming tasks that involve user input and conditional logic to perform various checks and calculations. These tasks include checking if a number is even or odd, determining voting eligibility based on age, and categorizing numbers and user input in various ways. Each task provides specific instructions for implementation using if-else statements and other control structures.

Uploaded by

shazarul bappi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

Even or Odd Number Checker

The document outlines a series of programming tasks that involve user input and conditional logic to perform various checks and calculations. These tasks include checking if a number is even or odd, determining voting eligibility based on age, and categorizing numbers and user input in various ways. Each task provides specific instructions for implementation using if-else statements and other control structures.

Uploaded by

shazarul bappi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

Even or Odd Checker

 Ask the user to enter a number.


 Use if-else to check whether the number is even or odd.
 Print the result.

2. Voting Eligibility Checker

 Ask the user to enter their age.


 If age is 18 or above, print "Eligible to vote".
 Otherwise, print "Not eligible to vote".

3. Positive, Negative, or Zero Checker

 Ask the user to enter a number.


 Use if-elif-else to check if it is positive, negative, or zero.
 Print the result.

4. Simple Calculator

 Ask the user to enter two numbers.


 Ask for an operator (+, -, *, /).
 Use if-elif-else to perform the operation and show the result.

5. Password Checker

 Ask the user to enter a password.


 If it matches "python123", print "Login successful".
 Else, print "Wrong password".

6. Marksheet Grader

 Ask for marks (0–100).


 Use conditions to print grades based on this:
o 80–100: A+
o 70–79: A
o 60–69: B
o 50–59: C
o 40–49: D
o 0–39: F
o Outside range: Invalid input

7. Age Category Checker

 Ask for the user's age.


 Print:
o Child (0–12)
o Teen (13–19)
o Adult (20–59)
o Senior (60+)

8. Largest of Two Numbers

 Ask the user to enter two numbers.


 Use if-else to print the larger one.

9. Largest of Three Numbers

 Ask for three numbers.


 Use if-elif-else to find and print the largest.

10. Leap Year Checker

 Ask the user to enter a year.


 Use logic:
o If divisible by 4 and (not by 100 or divisible by 400), it's a leap year.
o Else, not a leap year.

[Link] by 5
 Ask for a number.
 Check and print whether it is divisible by 5.

[Link] or Consonant

 Ask the user to enter a single letter.


 Check if it’s a vowel (a, e, i, o, u), else consonant.

[Link] of the Week

 Ask the user to enter a number between 1 and 7.


 Use if-elif to print the day name.
o (1 = Sunday, 2 = Monday … 7 = Saturday)

[Link] Checker

 Ask the user to input temperature in Celsius.


 Print:
o Cold (<15)
o Warm (15–30)
o Hot (>30)

15. Multiple of 3 and 5

 Ask for a number.


 Check:
o If divisible by both 3 and 5 → print "FizzBuzz"
o Else if divisible by 3 → "Fizz"
o Else if divisible by 5 → "Buzz"
o Else → "Not divisible"

[Link] System

 Ask for both username and password.


 If both match expected values, print "Login successful".
 Else, print "Login failed".

[Link] Number Checker (Basic)

 Ask the user for a number.


 Use if to check if it’s 2 or 3 → prime
 Else, check if divisible by 2 or 3 → not prime
 Otherwise, assume prime.

[Link] Calculator

 Ask for height (in meters) and weight (in kg).


 Calculate BMI = weight / height².
 Use if-elif to categorize:
o <18.5 → Underweight
o 18.5–24.9 → Normal
o 25–29.9 → Overweight
o ≥30 → Obese

[Link] Type Checker

 Ask for three sides of a triangle.


 Check:
o If all sides equal → Equilateral
o If two sides equal → Isosceles
o Else → Scalene

[Link] Interest Calculator

 Ask for principal, rate, and time.


 Use formula: SI = (P × R × T) / 100
 Check if any value is less than or equal to 0 → print "Invalid input"
 Else, calculate and show interest.

You might also like