Practice if Statement - 11.7.1 | 11. Python Programming | CBSE Class 11th AI (Artificial Intelligence)
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

Write an if statement to check if a person is eligible to drive at the age of 16.

💡 Hint: Think about the age limit for driving.

Question 2

Easy

Using an if statement, print 'Hello' if the user name is 'Alice'.

💡 Hint: You will need an equality check with '=='

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What does the if statement do?

  • Executes code if the condition is false
  • Executes code if the condition is true
  • Does nothing

💡 Hint: Remember the basic syntax of the if statement.

Question 2

True or False: The else statement is executed when its corresponding if condition is true.

  • True
  • False

💡 Hint: Think about when the else block activates.

Solve 1 more question and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Create a Python program that asks the user for a temperature in degrees Celsius. If the temperature is below 0, print 'Freezing'. If it's between 0 and 30, print 'Normal'. If it's above 30, print 'Hot'.

💡 Hint: Think about the ranges and structure your if-elif-else based on those.

Question 2

Design a program that asks a user to input their age and suggests whether they can enter a club (18+). Additionally, if the user is under 12, suggest other activities.

💡 Hint: Use multiple pathways to guide the user appropriately.

Challenge and get performance evaluation