Coding with Python

This term in Digital Technology we have started learning to a code in Python. With a bit of help we have been able to learn how to use the code in order to do a range of different things, such as picking random numbers, moving shapes, and using loops. The most difficult part is finding the errors in your code, because it’s often hard to look through all the different variables and lines of code you have written.

Other than that, I would say that it is fairly straightforward. Some things I have learnt about coding is the specific way that you have to write out all of the functions, because obviously the computer doesn’t understand English and so a simple typo can mess up your code.

We also learnt about the different libraries in Python, and how you can use them to import different functions to use in your code. For example, the random library can help you to use ‘randint’ which makes the computer choose and random integer from a certain range. We have been using for all of our work, and two of my favourite activities are the rock paper scissors and the turtle race.

Here, we used the turtle library as well as the pen and the loop functions to make four turtles race across the track. We learnt how to use the loop in order to repeat a code instead of having to write it again multiple times, and also used the pen to draw the track and move the turtles.

This is the rock paper scissors activity, where we learnt about inputs and outputs as well as the randint function. The player could choose between rock, paper and scissors, and then the computer would also make a random choice. Using the if statement, a different message would come up depending on what the computer and player chose.

Matthew Yap, 8B

Year 8 Digital Technology (DT) students are learning how to code with python, including myself. I find python easier than I originally thought. Once you get the hang of it, it seems pretty easy to do. Some of the work we have done and are doing currently, is focused on different aspects of real-life things such as art or animals like this Monday’s lesson where we turned a simple code into an Art piece by coding.

Sometimes DT has it’s up and downs, such as remote learning. Some of my toughest times during remote learning while coding would be trying to keep up with my teacher while switching tabs or even just trying to understand a code I’m unsure of. A positive though, is that once you get it done, you are proud to see the work you have achieved, particularly when it’s something that you have overcome as a challenge.

Part of the challenge is when the code is wrong but it’s written correctly and you have to figure out what part is wrong and fix it, (which most of the time rarely happens, but when it does it takes time.) Every time it happens, I manage to keep up with the work as well as fix the issue, which is great.

The best parts are getting to learn the codes once all the troubles are gone, like my current work I have finished which is Modern Art.

James Bywater, 8G