In this lesson, you learned:
else and finally keywordsassert keyword for debuggingWrite a function that accesses a global list. It should try to take the user’s input for how many times to repeat its process. Its process should be:
Ask the user for a value (any type)
Append that value to the list.
Once that is done, ask the user to press q to quit or to input a number to access that index of the list. There should be a different error message depending on the type of error raised. Whether or not there are errors, when the user is done (or there is an error), it should print the list and ask the user whether they would like to continue. If this input is ‘y’, call the function again.
Demo video:
https://www.youtube.com/watch?v=yUxvJm1ylnk
<aside> ⚖️ Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License.
If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact [email protected] for inquiries.
</aside>