Question: Python 3 code please. Can I know what is it asking? Question 1 Write a function count_clear (state) that takes a state of the cargo
Python 3 code please.
Can I know what is it asking?
Question 1 Write a function count_clear (state) that takes a state of the cargo terminal, and returns an integer count of the number of containers in the given state that are currently clear (i.e., have nothing stacked on top of them) Notes and assumptions Note: The ground is not a container, so it doesn't count. You can assume there are no duplicates. . count-clear ( [ [ ' c1 ' , ' c3 ' ] , [ ' c2' , ' ground' ] , c3 ' , ' ground' ) >>> 2 >> count_clear (['c1', c3'], 'c3', "c2'], ['c2', ground'11) 1 >> count_clear (L'c4', ground'], ['c5', 'ground'], ['c6', 'ground']) 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
