And here are the exercises for the level 4 of this course.
So I'm going to give you here two exercises.
The first one, you're going to compute the Max value
inside a list of numbers that you read from a file.
So the thing is that computing the Max value from a list of numbers,
you actually have done that before and you have a function for that.
So what you can do is you can use the function you have
created before and actually put it inside a Python module.
Okay, so we already have the my computations module.
You can put this function in that module and then use it in your code.
And also one thing to pay attention to is the data
type you are going to get when you read from a file.
This is a string, so make sure to cast it accordingly.
And the second exercise is to read a list of cities from a file,
order them alphabetically and write them to another file.
So here you can download the city list, okay,
as an additional resource of the course.
So download the list, put it somewhere in your computer
and then use either the relative or the absolute path.
What I'm going to do is simply to put the file in the same directory
as the Python file I'm going to write the code into.
And to sort the list alphabetically, well, you don't need to invent,
well, you don't need to invent a complex algorithm or write a lot of lines of code.
You can simply use the built-in sorted function
which simply takes one parameter which is the list you want to sort.
And this is going to return the sorted list.
All right, so take the time to do the exercises.
If needed, come back to the previous lessons and watch them again.
And then I will see you in the next lesson for the solution.