Practice Using FOR with Lists - 21.2.4 | 21. IF, FOR, WHILE | CBSE Class 9 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 that prints numbers from 1 to 5.

💡 Hint: Use the range function.

Question 2

Easy

Create a list of three fruits and iterate through it to print each fruit.

💡 Hint: Think about how to access list elements in a loop.

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 is the correct syntax for a FOR loop in Python?

  • for variable in list:
  • loop variable = list
  • while variable in list

💡 Hint: Look for the keyword 'for' in the syntax.

Question 2

True or False: The FOR loop can only iterate over numbers.

  • True
  • False

💡 Hint: Recall that lists can contain various data types.

Solve 1 more question and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Create a program that accepts a user input list of names and prints them in alphabetical order using a FOR loop.

💡 Hint: You need to sort the list before printing.

Question 2

Write a FOR loop that generates the Fibonacci sequence up to a specified count and prints it.

💡 Hint: Remember the classic Fibonacci definition where the next number is the sum of the two preceding ones.

Challenge and get performance evaluation