Question: Using Python 3! Thanks hanks! Write a function count_clear (state) that takes a state of the cargo terminal, and returns an integer count of the

Using Python 3! ThanksUsing Python 3! Thankshanks! Write a function count_clear (state) that takes ahanks!

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' ] , e2 ' , ' ground ' ] , [ ' c3 ' , ' ground' ] ] ) 2 >>> count-clear ( [ [ ' c1' , ' c3' ] , [ ' c3 ' , ' c2' ] , [ ' c2' , ' ground ' ] ] ) 1 >count.clear (II'c4', 'ground'], ['c5', 'ground'], ['c6', 'ground']1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!