4.0k views
1 vote
Code Example 4-2 def get_volume(width, height, length=2): volume = width * height * length return volume def main(): l = 3 w = 4 h = 5 v = get_volume(l, w, h) print(v) if __name__ == "__main__": main() Refer to Code Example 4-2: If you add the following code to the end of the main() method, what does it print to the console? print(get_volume(10, 2))

User Ahmer
by
5.2k points

1 Answer

4 votes

Answer:

Hence the answer is 4.

Step-by-step explanation:

get_volume(3,4,5) returns 3*4*5 = 60

width is 3

height is 4

length is 5

User Maciej Treder
by
5.2k points