File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
exercises/09-Max_integer_from_list Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change 22
33## 📝 Instructions:
44
5- 1 . Create a function named ` maxInteger `
5+ 1 . Create a function named ` max_integer `
66
7- 2 . This function should take a list as an input parameter and
8- return the maximum number found in the list.
7+ 2 . This function should take a list as an input parameter and return the maximum number found in the list.
98
1093 . You should use a 'for' loop to iterate through the list.
1110
12- 4 . Use the ` print() ` function to print what the function returns when it is called.
13- - For ** example** : ` print(myFunction(param)) `
11+ 4 . Use the ` print() ` function to print what the function returns when it is called. For example: ` print(my_function(param)) `
1412
15- ## 💡 Hint :
13+ ## 💡 Hints :
1614
17- - Define an auxiliar variable and set the first value to ` 0 ` .
15+ - Define an auxiliary variable and set the first value to ` 0 ` .
1816
1917- Then compare the variables with all the items in the list.
2018
21- - Replace the value every time the new element is bigger than the one stored in the auxiliar variable.
19+ - Replace the value every time the new element is bigger than the one stored in the auxiliary variable.
2220
23- - At the end you will have the biggest number stored in the variable.
21+ - At the end, you will have the biggest number stored in the variable.
2422
25- ## Expected Result :
23+ ## 💻 Expected result :
2624
27- ``` py
28- Your result should be 5435 .
25+ ``` py
26+ 5435
2927```
You can’t perform that action at this time.
0 commit comments