Thursday 19 September 2019

Python - Day One (September)

WHAT I DID TODAY:


Today I started working on Python on the website, Code Academy. Specifically, I started the course Python 2, where they showed and explained a bunch of basics such as printing text, errors, variables, and even math-related code (using code to calculate equations). To sum it all up, I just followed the tutorials/walkthrough assignments they tell me to do.



I made it through 9 lessons on this specific day...



WHAT I LEARNED:


Considering this was the first day, I learned a lot of basics. I also learned that there is python 2 or python 3. I'm currently doing Python 2, but I learned the most significant difference between the two is that python 3 uses parenthesis for the print command that I will be talking about later.

  • The first thing I learned was how to print stuff aka write text in code form. In order to do that all you need to type is print and use quotes or apostrophes like below. The first picture is python 2 as it has no use of parenthesis.



  • The second thing I learned was that each programming language has its own built-in calculator. This means that the computer will easily calculate the equation for you while you just need to type the equation in. To do that, all you need to do is use _ (underscore) to assign the code a special meaning first.  After that, you just normally use an equation like 5/5 and use print command so the computer calculates the code and writes out the answer. This is an exercise code academy made me do.


I think looking at this picture you can tell how it works a bit because it's pretty self-explanatory.


  • The third thing I learned was how to write a comment. This one is very simple, but at the same time can be very useful. Basically, all you need to do is use the # character and with that, you can write personal notes to yourself without having it show up in the code. (this command is normally used in situations where you want to remember something)



(as you can see, the comment does not show up in the code)


WHAT I WILL BE DOING TOMORROW / NEXT TIME:


Tomorrow I will be continuing the course/finishing it up as there are only a few lessons left. 


And after that I will probably start on a different Python course in Code Academy. (probably free ver)

No comments:

Post a Comment

Adobe Photoshop - Day 10 (June Final Post)

WHAT I DID TODAY / WHAT I LEARNED: For my final project, I thought for a while about what I could do. Then I remembered a while back I saw ...