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.



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

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

Or sign up using:

Already have an account?