What would be the best way to approach this problem?
We have a sheep farm, with two wool collector machines.
-
The sheep have the following attributes: Age: Young, and Old. Color: Black and White.
Both age and color values are random.
-
Both machines only collect wool if the sheep are old. If not will echo:
This sheep is
not ready to be sheared.
- The animals should be processed in groups, for
example 20 sheep in a row. And there should be a counter of total
wool collected in each machine, both black & white.
I just need some guidance with syntaxis to get started. Thanks!
Sheep and machines are separate objects. Here’s a start:
Let us know where you’re at further on.
Swapping out the ternary operator: