Learning Python

Learning Python

I took on a new challenge and to make it more serious for me, I would like to document and write about my progress. It will help me to stay motivated (I hope).

I started to learn Python. You may ask “Why?”. And that’s actually very easy to answer: I want to program Roßbergs fonts; I want to make them dynamic.

Therefore, I have started with a few online tutorials to understand some basics of programming and now I am working though the website pythonfordesigners.com by Roberto Arista. Thank you Roberto, for this wonderful source!

The exercise I have solved today is in the section “How to make choices”.

Screenshot of pythonfordesigners.com/how-to-make-choices/#workbook


And here is my solution:

newPage(200, 200)
height = 10
amount_squares = 0

rect(0, 200 - height, height, height)

while height * amount_squares < 200:
・・・・if amount_squares % 2:
・・・・・・・・fill(0)
・・・・else:
・・・・・・・・fill(.3)
・・・・amount_squares += 1
・・・・new_pos = 200 - height * amount_squares
・・・・rect(0, new_pos, height, height)

Not sure if this is how it is supposed to be, but it works for me.


I also would like to mention a great meetup, which I visited yesterday for the first time. It’s the PyLadies Berlin: https://www.meetup.com/de-DE/PyLadies-Berlin/
Thank you for the inspiration and motivation, it was wonderful!

Not sure how fast I will proceed with my project of learning to code, but I will keep you up to date on my progress. If you are inspired and feel like working together on that challenge, please drop me a note.


Posts