A Tale of Two Chatbots

Introduction

We were introduced to Python on the first fortnight – a programming language, not Python, the snake. I always wanted to learn this programming language, but I didn’t need to use it, so I have never prioritised it. However, learning Python has been one of my personal development area that I want to explore. My simple goal is I want to be comfortable enough to understand the Python codes and hopefully create something useful with Python for my maker project. I learned how to code in Python language using Python Turtle and Visual Studio Code for the first time, and these are some of my proudest achievements in the first week.

The Process

I was super excited to draw the letter “A” using “Harry the Plotter” machine. Then follow by other letters that I was given (Task 1) to draw the letter “C” and the letter “D”, continue by draw my initial and name as I want to challenge myself further.

(Please click on the picture to see the code)

From AC/DC to Egypt

For Task 2, we had to make the letter “C” and “D” repeated in the reverse order as “CDDC”. Then I challenged myself to make it curve, and it was more complicated because of the circular rotation. However, after few trials and error attempts, with simple tips from Johan to always bring back the position to home, it finally worked!

Straight CDDC
Curve CDDC
Straight C pyramid
Curve C pyramid
Straight D pyramid
Curve D pyramid

Pyramid Yippee Ki Yay Moment

I have to redo my pyramid as I used the letter “M” at the beginning instead of the letter given (C and D). I used 2 simple for loop functions using level as the range. I then used trial and error of multiple functions combination until I found below:

Width * (b – a) * 2

Height * (a + b)


After that, I set up all the parameters and made some assumption for X and Y coordinates. Then, I created a matrix table and plotted those number coordinates on graph paper. It helped me to visualise the pyramid. The height and width of the letter can be adjusted to make it look nicer and in the right proportion for the pyramid.

Multiple Error Outputs

For Loop Arts

I applied the for loops functions to create the repetition for forward and right/left functions, which will change over the specific range that I defined. Changing the angle each time for the loops will create a different shape, e.g. 90˚ angle will create a square, and 70˚ angle will create a pentagon shape.

I also tried the circle function and modified the angle to create a beautiful circle of flower.

I could just stop here for my art piece, but then I like to challenge myself to create a letter “M” using a combination of these for loops shapes. So I draw and position each shape in specific coordinates to make a big letter “M”.

Continued from the letter “M” art, I tried to simplify it by calling each shape for specific coordinates that I defined. The tutors (Matt & Mina) have kindly explained the new function, the concept of coordinates and arrays for the loops positioning, and helped me simplify the codes and logics.

I also challenged myself again by adding a new shape (love heart) into my letter “M”.

I could probably add more shapes or create a new combination of shapes if I have more times later as I really enjoyed this activity.

Reflection

In the first week, when we had the Studio Induction, I was so excited to meet “Harry the Plotter” machine, especially because it was my very first time learning how to draw letter A using codes in python. I get excited when I learn something new.  I always want to learn python as I heard so much awesome stuffs that you can create using Python. I learnt a little bit of coding using SQL during my postgraduate study in 2019 and used it a little bit at work last year but using template codes that someone already created. I have never written a code from scratch before. So, I find it immensely challenging at the beginning to understand the concept of Python. My ideas and belief about python are somewhat the logics are similar to SQL, so I should be able to relate them using common sense, but I don’t know the syntax/functions for Python.

I feel like we were thrown at the deep end straight away without the thorough introduction of python from a beginner perspective and definitely outside of my comfort zone. With my positive attitude, I believe that the best methods for me to learn is when I can play around with it and figure it out as I go. If I’m still stuck, my next approach is to ask for help nicely from other people (Matt), who’s a Python expert to finally understand its brief concept. 

After reading and practising the exercises in the Google Collab, I applied them into my homework, and I’m so delighted that I managed to figure out the loops functions to build the letter pyramid. Also, drawing/plotting the coordinates on graph paper is one method that helps me to visualise it better. Because I find this way easy to understand, I then shared and helped other students in my cohort who’s struggling and never done python before. I tried to explain it in simple language without coding jargon that they can understand.

With the task4 art piece, I tried to push my learning to the next level by applying the for loops multiple times and adding the new coordinates and arrays. Thanks to Matt and Mina, who helped me to understand this new concept. Overall, I enjoyed the build homework despite the challenges that I encountered at the beginning. I wouldn’t be able to complete it without some help from other people. In future, I’m hoping to learn more and can have some practice/learning before attempting the homework, so I know what to expect.

Acknowledgement

Matt and Mina who helped me to understand this new Python concept.

Johan for helping me with the codes and showing how to connect and use “Harry the Plotter” machine correctly.