Today I worked consistently and managed to get a lot done. I started where I left off last class: if-statements. After that, I went on to learn about random behaviour, and then where I ended was at the Joy of Code #7.
After I learned about if-statements I realize that it is crucial to know how to code them because they will come up very often. Even in the 2 videos that followed it I used if-statements countless times.
I was happy to learn how to make random behaviour, because this makes everything 10 times more interesting in my opinion. I was frustrated before about not being able to make the turtle turn left, but know I have learned to make it do that. And finally the last video that I saw was one where Michael teaches you to make the turtles move around randomly and when they find a lettuce they eat it.
What I'm starting to realize is that the code gets more and more complicated, and it will always go on like that. Now there are more complex things to write, such as when you have to write an action but before have to add what class it is from, such as (Greenfoot. ... .... ). Also what is more complicated is how to make the turtle turn left- you have to add negative numbers for it to choose a random number that can be under 0 ( the only way to make it turn left).
I also noticed that with Greenfoot even though Michael Kolling teaches us how to code, you can sort of play around with things. For example what I did last class, was instead of making the turtles find lettuce, I made them find a Tommy and eat him instead of the lettuce. All I did was create a new sub class, add an image of tommy, and add it to the lines of code. The picture below shows this. I enjoy Greenfoot very much because I can experiment with this type of stuff.
No comments:
Post a Comment