In this activity, I will give you a challenge which will make you practice everything you've seen until
now.
Variables.
Functions.
Scope.
Conditions.
Loops and lists.
Here is what you have to do.
You have to create a program that will go through a list of integer numbers, and will compute the maximum
value inside the array.
And then you print this max value.
Okay.
And some of you might know already that there is a function that does that in Python.
So we don't need to write this code at all.
But the goal is to practice on the concepts.
Okay.
That's why I give you this challenge.
So I'm just going to start here to give you a few tips.
And then you can practice.
You will create a list for example number list like this is equal to.
And let's put some values.
Okay.
So for example one and then five -612 and seven.
Okay.
So five values.
Just choose any values you want.
It doesn't really matter then to be able to compute the max value.
We are going to actually create a variable named max value.
And you can see if you just write Max, there is syntax highlighting here.
So if you see this okay, if you want to create a variable and you see that the name turns purple like
that or another color.
Don't use that because it's probably a reserved keyword or a function.
So for example here we use max value.
We're just going to create a variable and we initialize it.
So you could use zero to initialize it.
But we're just going to initialize it to the first element.
So number list zero we initialize it to the first element of the list.
And then well then it's your turn to practice.
That's the challenge.
What you will have to do is well, you will have to go through all of the elements of the list and then
find a way to keep the max value.
Okay.
When you find a max value, you keep it and at the end you print it, okay.
And that's the first step.
So you write the code to compute the max value.
You print it.
Then as a second step you can create a function just for that functionality.
So then you can call the function from your main program okay.
And I will see you in the next video for the solution.