Practice Control Structures (10.6) - Introduction to Python - CBSE 10 AI (Artificial Intelleigence)
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

Control Structures

Practice - Control Structures

Enroll to start learning

You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

Write a conditional statement to check if a number is greater than 10.

💡 Hint: Use the `if` keyword to start the statement.

Question 2 Easy

How would you use a for loop to print numbers 1 to 3?

💡 Hint: Remember that `range` defines the end number as non-inclusive.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What does an if statement do?

It runs code once
It runs code based on a condition
It cannot be used with else

💡 Hint: Think about the conditions that determine what code is executed.

Question 2

True or False: A while loop will always execute at least once.

True
False

💡 Hint: Consider what must happen for the loop to start.

2 more questions available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Write a Python program using control structures that allows a user to continue entering numbers until they input a negative number, then outputs the total sum of the entered numbers.

💡 Hint: Be careful to only break from the loop when the user enters a negative number.

Challenge 2 Hard

Create a Python program that generates and displays the multiplication table for a number provided by the user until they choose to stop by entering 'x'.

💡 Hint: Make sure to handle the exit condition so the loop can stop gracefully.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.