That's right, the world is sadly confused. Pythons do not eat Jeroos, they guide them! Well sort of, at least that's what i'm getting so far. So python is one of the codes to use for the program Jeroo. Turns out (thankfully) that Jeroo likes me a lot more than Scratch. This week the class learned about the basics of the program as well as how to program methods or a series of behaviors a jeroo can do that could be thought of as being similar to the repeat scrip in scratch. Basic code is as follows:
to create a jeroo: name=jeroo(row#,column#,number of flowers or cardinal direction)
jeroos can: hop(), pick up flowers, pick(), plant a flower, (plant), toss a flower one spot ahead (toss)
give a flower,give(dir) and turn in a direction, turn(dir)
dir= LEFT, RIGHT,AHEAD,HERE
Methods on the other hand are a series of behaviors a jeroo will perform all branched under one main 'headline'
Writing a method:
Under the methods tab-
def name(self):
self.hop()
self.pick(1)
....
Under the regular tab-
jerooname. name()
Tomorrow we're learning about loops. Hopefully this week will be an even more pleasant experience!
No comments:
Post a Comment