Homework 0
Homework Reflection SurveyGradescopeDue: Thursday September 17, 2026 5:00PM
Goals:- Warm up for more challenging programming exercises
In this preliminary homework assignment, you will write a function in a programming language of your choice and reflect on your experience.
AI Policy
This assignment is designed as a warm-up, but also a self-evaluation. I expect that students with appropriate background for the class should feel comfortable completing this assignment, and it requires no knowledge from CS 201. If you have to look up some syntax, that’s fine! I will use your submitted code and reflection to determine if you may need extra support in this class. Accordingly, it is critical that the code that you submit is your own and written without the help of generative AI.
You will receive full credit for this homework assignment as long as you submit code that attempts to solve the problem below and submit the required reflection.
Mean String Length
Write a function in any language mean_string_length that takes in a list or array as input. The function should return the mean length of the strings in the list, and you can assume that the list has at least on string in it.
Consider the following input strings:
"Beagle"
"Great Dane"
"Golden Retriever"
"German Shepherd"
The lengths of the strings are 6, 10, 16, and 15. Therefore, the function should return \(\frac{6 + 10 + 16 + 15}{4} = \frac{47}{4} = 11.75\).
Testing
Test your function by calling it on at least three different lists and printing the result. The test cases should be in the file you submit!
Homework Reflection Survey
When you finish, complete the Homework Reflection Survey using the button at the top of the page. Fill out the form and click Download JSON to save hw00-reflection.json, then upload that file to Gradescope alongside your code. Completing the reflection is required for every homework assignment.