Practice For Loop (11.8.1) - Python Programming - CBSE 11 AI (Artificial Intelligence)
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

for Loop

Practice - for Loop

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 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.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

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.

1 more question available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

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.

Challenge 2 Hard

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

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

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.