Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.
Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.
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.
Test your understanding with targeted questions related to the topic.
Question 1
Easy
What will be the output of the following code? fruits = ['apple', 'banana', 'mango']; for fruit in fruits: print(fruit)
💡 Hint: Think about what each element in the list is.
Question 2
Easy
How do you access the first element of the list using indexing?
💡 Hint: Remember, indexing starts from 0!
Practice 4 more questions and get performance evaluation
Engage in quick quizzes to reinforce what you've learned and check your comprehension.
Question 1
What is the output of the code fruits = ['apple', 'banana', 'mango']; for i in range(len(fruits)): print(fruits[i])
?
💡 Hint: Think of what the loop is doing with each index.
Question 2
True or False: Using for fruit in fruits
is the only way to traverse a list.
💡 Hint: Consider the different methods we've discussed.
Solve and get performance evaluation
Push your limits with challenges.
Question 1
Write a function that takes a list of numbers and returns a new list with each number doubled using traversal.
💡 Hint: Consider how the items should be processed as you traverse the list.
Question 2
Given a 2D list, write a function that returns the sum of all the inner lists by traversing.
💡 Hint: You will need to traverse the outer list and then the inner lists.
Challenge and get performance evaluation