Practice Conditional Statements - 11.7 | 11. Python Basics | CBSE Class 10th AI (Artificial Intelleigence)
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 a simple if statement to check if a number is positive.

💡 Hint: Use 'if number > 0:' in your statement.

Question 2

Easy

Create an else statement that prints 'Not positive' if the number is not greater than zero.

💡 Hint: Remember how the else statement works.

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 keyword is used to conditionally execute a block of code?

  • loop
  • if
  • for

💡 Hint: Think about the statement that starts with 'if'.

Question 2

True or False: The else statement is executed if the if condition is true.

  • True
  • False

💡 Hint: Remember what happens when the if condition is true.

Solve 1 more question and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Write a program that categorizes animals based on the number of legs (e.g., 2 for birds, 4 for dogs, etc.). Provide a message for any other case.

💡 Hint: Think about what animals you can categorize and their typical leg counts.

Question 2

Create a program that assigns grades based on numerical scores using conditionals (A, B, C, D, F). Define the ranges for each grade.

💡 Hint: Remember to define clear ranges for each grade before writing the code.

Challenge and get performance evaluation