Practice for Loop - 11.8.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 a for loop to print the numbers 0 to 3.

💡 Hint: Use range to specify how many numbers to loop through.

Question 2

Easy

Create a loop that prints each letter in 'Hello'.

💡 Hint: Remember to iterate over the string directly.

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 for loop do in Python?

  • A. It runs a piece of code once.
  • B. It iterates over a sequence.
  • C. It defines a new function.

💡 Hint: Think about how you would use it to traverse a list of items.

Question 2

True or False: The range function can only produce even numbers.

  • True
  • False

💡 Hint: Consider how you can use the range to generate different sequences.

Solve 1 more question and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Write a function that uses a for loop to find the factorial of a number.

💡 Hint: Remember that factorial means multiplying all integers from 1 to that number.

Question 2

Create a reverse for loop that prints the numbers from 5 to 1.

💡 Hint: Use the range function with a negative step value.

Challenge and get performance evaluation