Throw the Dog a Ball
I clearly forgot to close the parentheses on my calls to
print() here. All right, got those fixed. Save and run again. Here we are. And then I will have the dog Puppy go and fetch something, so
dog.fetch() and I can pass it a thing, so it’ll go fetch a
And as an output I get the string
'stick' in this case. Imagine this would be an object, and you would then continue doing something with it. Maybe the dog goes and fetches it, but buries it under the ground.
throw balls with the dog, and it’s going to run off, get the ball, and return it to me. Great. This is a little idea of how you could continue to work on this
Farm model and do lots of other things, but there’s other ideas that you could implement.
Become a Member to join the conversation.