During the first
week of class I learned basic information on programming languages in our
reading assignment in our textbook TEC 101: Fundamentals of Information
Technology & Literacy (Vahid, 2019). I learned about machine language,
assembly language, high-level language, and Python. Each of these sections had
an exercise to familiarize the student with the program languages. With
practice and application, I am sure that I would have a better understanding of
each of these programming languages. After learning the basics of these
programming languages, I had some practice programming in Scratch. This is the
animation that I created using Scratch: https://scratch.mit.edu/projects/711340749/
I started playing around with Scratch when I had a few minutes of free time at work the other day. I noticed that the commands were basic and easy to piece together, but I could not figure out how to start the program. A couple days later I sat down to work on this assignment and found a way to resolve this problem using “Tutorials” the top of the screen and a video, “Getting Started.” I found “Events” as the fourth option down. This is where I would find the buttons that would make things start to happen. My initial idea was to create a simple animation that is started with the click of a button. There are other options to start events, but I just wanted a simple click of a single button to start the animation. Now that I determined how to start my sequence of events, I needed a character for my animation. At the bottom right of the screen, there is a little cat face, which, when selected will take you to a variety of “Sprites” or people, animals, and objects. I selected animals and found my character “Dinosaur3” a pterodactyl, my 3-year-old son’s favorite dinosaur. Next step is animating my character.
Initially, my idea of making a pterodactyl fly from one
part of the screen to another part of the screen seemed pretty easy. The
pterodactyl would start at the top right corner of the screen by putting in
coordinates that I selected. The next command would send my pterodactyl to the
bottom left of the screen. This part was simple, but the pterodactyl’s wings
were still during this flight. Instead of turning to the tutorials or YouTube,
I tried to solve this one on my own. I found at the top left of the screen, in
“Costumes,” there can be multiple different graphics for your character or
item, and you can edit the graphics and create your own new costume. Here, I
found two different positions for my pterodactyl and going back and forth
between these two would show my pterodactyl to flap its wings. Going back to
“Control” I found a command to repeat this flapping animation multiple times.
At first my pterodactyl would glide across the screen to the bottom left and flap
its wings in that location. I found that I needed to start another group of
controls where I would have one to move the pterodactyl and the other to make
the pterodactyl flap its wings. Eventually I timed everything where the
pterodactyl flapped its wings while flying.
I learned quite a bit in Scratch already at this point,
even adding a “caw” from my pterodactyl, but I needed to add something else to
the animation. I added another “Sprite” to my animation, an unsuspecting snake.
The snake would also have two groups of controls for its animation. The
pterodactyl would grab the snake and fly off with it. The snake would then fall
to the ground and slither away. Besides making the timing of my animation work
together, I had very few issues from this point on. There were always the
tutorials and YouTube if I would get into a bind with my project.
After playing
around with Scratch for a few hours, I thought back at the programming
languages that I read about in our textbook. Scratch was most similar to Python
than the other programming languages. They are both very user friendly when it
comes to putting in commands. Tim Statler wrote in Comp Sci Central, “Python is
a very high-level programming language because its syntax so closely resembles
the English language. Higher-level means it’s more readable to humans and less
readable to computers. Likewise, Lower-level means less readable for humans and
more readable for computers (Statler, 2022).” Higher-level programming
languages have slower execution times because the programming has to be
translated into machine code for the computer to process it.
References
Vahid, Frank, (2019, February). TEC
101: Fundamentals of Information Technology & Literacy.
Statler, Tim, (2022). Comp Sci Central.
Is Python a High-Level Language?
No comments:
Post a Comment