Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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! Thankshanks!
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started