0% found this document useful (0 votes)
2 views2 pages

Python Conditional Statements Questions

The document contains a series of practice questions for Python conditional statements, categorized into four sections: if statements, if-else statements, elif statements, and nested if statements. Each section includes ten specific programming tasks aimed at reinforcing the understanding of conditional logic in Python. The tasks range from checking number properties to user eligibility and categorization based on various criteria.
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)
2 views2 pages

Python Conditional Statements Questions

The document contains a series of practice questions for Python conditional statements, categorized into four sections: if statements, if-else statements, elif statements, and nested if statements. Each section includes ten specific programming tasks aimed at reinforcing the understanding of conditional logic in Python. The tasks range from checking number properties to user eligibility and categorization based on various criteria.
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

Python Conditional Statements Practice Questions

10 Questions on if Statement
1. Write a program to check if a number is positive.

2. Write a program to check if a person is eligible to vote.

3. Write a program to check if a number is greater than 100.

4. Write a program to check if a student passed (marks ≥ 40).

5. Write a program to check if a number is divisible by 5.

6. Write a program to check if temperature is above 30°C.

7. Write a program to check if salary is greater than 50,000.

8. Write a program to check if a character is uppercase.

9. Write a program to check if a number is less than 0.

10. Write a program to check if age is above 60 for senior citizen discount.

10 Questions on if-else Statement


1. Write a program to check whether a number is even or odd.

2. Write a program to check whether a person can vote or not.

3. Write a program to check whether a number is positive or negative.

4. Write a program to check whether a number is divisible by 3 or not.

5. Write a program to check whether a student passed or failed.

6. Write a program to check whether a number is greater than 50 or not.

7. Write a program to check whether a character is vowel or consonant.

8. Write a program to check whether a number is multiple of 10 or not.

9. Write a program to check whether entered password is correct or incorrect.

10. Write a program to check whether a number is greater than another number.
10 Questions on elif Statement
1. Write a program to find greatest among three numbers.

2. Write a program to display grade based on marks.

3. Write a program to create a simple calculator (+, -, *, /).

4. Write a program to check whether a number is positive, negative, or zero.

5. Write a program to display day name based on day number (1–7).

6. Write a program to display month name based on month number.

7. Write a program to categorize age group (child, teenager, adult, senior citizen).

8. Write a program to check traffic light signal actions.

9. Write a program to assign division based on percentage.

10. Write a program to check largest among four numbers.

10 Questions on Nested if Statement


1. Write a program to check voting eligibility and citizenship using nested if.

2. Write a program to check username and password using nested if.

3. Write a program to find greatest among three numbers using nested if.

4. Write a program to check if a number is positive and even using nested if.

5. Write a program to check ATM PIN and sufficient balance using nested if.

6. Write a program to check if student passed and got distinction.

7. Write a program to check if employee is eligible for bonus based on experience


and salary.

8. Write a program to check if a person can apply for driving license based on age
and documents.

9. Write a program to check if a user entered correct email and password.

10. Write a program to check if marks are above passing marks and attendance is
above 75%.

You might also like