Monday 30 September 2019

Python - Day Four (September)

WHAT I DID TODAY:


Today I finished up the remaining lessons on 'Strings and Console Output.' After that, I also did a quick review. So far in this whole course, I've completed 10% as of now.



10% COMPLETION


After that, I also did a quick review...


REVIEW OF EVERYTHING I LEARNED

Overall, most of the lessons in this unit seemed to be a bit similar to the very first unit aka 'introduction.' I did also learn a lot of new things too so I don't think it's a waste of time to review either because it just helps me become more used to the code.



WHAT I LEARNED:


  • The first one is easy and is maybe already considered common sense, but to me, I totally didn't think of this. I found out you can use the + sign to add strings together. I thought you only use it for adding equations but I was wrong.
ADDING STRINGS TOGETHER TO FORM SENTENCES


  • Another thing I learned that was completely new was the % command. Basically, it allows me to add strings and variables together. By using % I can use variables and strings in the same line of code. By doing so, it allows me to create more variations and different types of results.
EXAMPLE OF ME SEPARATING THE CODE

(ALSO THE VARIABLES LINE UP IN ORDER WITH THE %s


WHAT I WILL BE DOING TOMORROW / NEXT TIME:


Tomorrow I will be continuing down Python 2, but a new Unit. I will be starting the 'Date and Time' Unit on 'Code Academy.'



Tuesday 24 September 2019

Python - Day Three (September)

WHAT I DID TODAY:


Today I started working on the Strings & Console Output unit in the Python 2 course. I only got through half of it, so 8/16 lessons but I actually learned a lot more than I did on my other days. 


TYPE OF LESSONS I WENT THROUGH

Despite the few lessons I went through, I also did additional research so I can understand how the strings work more easily instead of just speeding through everything.



WHAT I LEARNED:


Even though it looks like I didn't do much I learned a lot of new things.

  • The first thing I learned was about another error type of problem. When writing code in python doubles quotes " or single ' is sometimes used. But sometimes when using single quotes, it's possible that the use of an apostrophe is needed for words such as (isn't.) When this happens, the code will obviously show up as error since it's basically breaking the line of code. To fix this, I learned that you just need to put a \ in between the letter before the apostrophe and the apostrophe itself. Below shows a clearer visual image of what I said.
FIXED VERSION
BROKEN/ERROR VERSION


  • The second thing I learned was using a single command to transform a whole line of text into capital/lower case letters. This command may not be super useful but who knows. And it is something new I learned so I decided to add this in. The command to do so is .upper() or .lower() after the variable in print. Examples are shown below.
.lower()
.upper()



  • The third thing I learned was that there is a command that counts the number of characters you have. It is a very simple and self-explanatory command. 


EXAMPLE

(So you just assign a variable a text, like normal, then use 
print len(variable)

WHAT I WILL BE DOING TOMORROW / NEXT TIME:


I will be continuing on with the Strings unit on Code Academy. 



Saturday 21 September 2019

Python - Day Two (September)

WHAT I DID TODAY:


Today I finished up the few remaining lessons I couldn't finish up last time on 'Code Academy.'




On lesson 10, I didn't do much except learn a tiny bit more about using division in the equations. (it's not super important so I will not discuss it because it was the same concept I discussed in my last post) And at the end I did a review that includes all the concepts I learned.



(This is the result of everything I learned)

I also didn't do A LOT this day because I wanted to actually learn how the codes worked instead of speeding through the tutorials.



WHAT I LEARNED:


The first thing I learned was the """ aka triple quotes code. What it does is allow my code to span to different lines. This code works when you want to type a paragraph or poem without having to use the code multiple times. If my explanation was a bit hard to understand this picture might help.



(This is an example of a haiku that needs to span to multiple lines)




The second thing I learned was 'boolean.' In simpler terms, it's just true and false commands. Booleans operate for example with keywords such as AND, BUT, OR to carry out the desired action the user needs. The tutorial did not provide much use to this command but here's the example I was told to do.


(I was told to read the comments, then prescribe the codes with true/false commands)


I only learned these 2 things as the course was pretty much over by then..


WHAT I WILL DO TOMORROW / NEXT TIME:




So far I only completed 5% of the course after all those lessons. So to continue on tomorrow / next time, I will move on to part 2 of the course aka Strings & Console Output. 


PART 1 OF THE COURSE FINISHED, NOW I WILL DO #2



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)

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 ...