Common Computer Science References
At the end of this lesson, you will be able to:
understand and create your own function that has multiple parameter
return values
nil
create a function that calculates the volume of a cylinder
it gets passed the 2 parameters as integers and returns a decimal with 3 decimal places (because of π)
if possible use named parameters and reverse the order
you can use math.pi inside a function, since it is a standard library
then create a program (main) to accept the 2 inputs, ensure any errors are caught and display the results
read Functions with Multiple Parameters , Computer Based Problem Solving
recreate the same above program in C
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.