Exercise: Loops and lists
Practice lists and loops in this set of exercises. A few of them have comments to guide you towards a solution; you can follow those comments if they help or delete them and start from scratch. Whatever works for you!
Make point
Implement make_point
, a function that returns a list with the two arguments x
and y
, each rounded to integer values.
Tip: Remember one of Python's built-in functions makes it easy to round numbers.
📺 Need help getting started? Watch me go through a similar problem in this video.
Average scores
Implement average_scores
, a function that returns the average of the provided list scores
.
📺 Need help getting started? Watch me go through a similar problem in this video.
🧩 Or, for more guidance in written form, try a Parsons Puzzle version first.
Concatenator
Implement concatenator
, a function that returns a string made up of all the strings from the provided list items
.
(There is a way to do this with a single function call in Python, but for the purposes of this exercise, please try using a for loop to join the strings.)
🧩 For more guidance, try a Parsons Puzzle version first.