Learn

This kind of loop is useful when you want to do something a certain number of times, such as append something to the end of a list.

Instructions

1.

Create a for loop that prompts the user for a hobby 3 times.

Save the result of each prompt in a hobby variable

append each one to hobbies.

print hobbies after your for loop

Make sure to answer the prompts in the terminal when testing your code!

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Already have an account?