Practice Lists and Loops - 3.2 | Python for Data Science | Data Science Basic
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

Lists and Loops

3.2 - Lists and Loops

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

Define a list of three vegetables.

💡 Hint: Remember to use square brackets!

Question 2 Easy

What does fruits.append('orange') do?

💡 Hint: Think about the structure of lists.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What is the output of fruits = ['apple', 'banana']; for fruit in fruits: print(fruit)?

'apple'
'banana'
'apple'
'banana' in lower case
'Apple'
'Banana'

💡 Hint: Think about how for loops work.

Question 2

True or False: Lists in Python can contain different data types.

True
False

💡 Hint: Recall the flexibility of lists.

2 more questions available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Given a list of numbers, write a function that returns a new list with each number doubled.

💡 Hint: Use list comprehension for a concise solution.

Challenge 2 Hard

How would you count how many times each fruit appears in a list?

💡 Hint: Think about how to use dictionaries to track counts.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.