Common Computer Science References
At the end of this lesson, you will be able to:
understand and pass an array (or list in python) as a parameter to a function
passing parameters
nil
create a program that has a function that will accept an array
once again you can just randomly generate 10 numbers
the function MUST use a while loop
it will find the largest value in the array and pass it back as a single variable
the function CAN NOT hard code how many elements are in the array
you MUST use a loop, you can not use a built-in "max()" function!
your Test Cases will not be normal, you are generating random numbers so you do not know them in advance
just have 1 test case explain how you are going to check to ensure the result is correct
then under each of the 3 screenshots of the program running, do the calculation to prove it is correct
read over over Arrays as Parameters , Computer Based Problem Solving
recreate the same above program in a second language
NOTE: You can turn on "Closed Captions" to see a printout of what is being said by selecting the "CC" button.
You can also have it translate the closed captions by going to "Settings, Subtitles/CC, Auto-translate" and then pick your prefered language.