Friday 15 November 2019

Python - Day Twenty (November)

WHAT I DID TODAY / LEARNED:

As you can above by my title, if it wasn't already obvious, I didn't learn anything new today because I think they already taught me all the new things/codes in the beginning. I would assume it's like that because all I did were small exercises using the new codes. I now have finished 65% of the Python course.


65% COMPLETED


I did a few different exercises that showed me different ways to use the new codes. A quick recap of the new codes I learned were while and else. (and just how loops work in general.)

  • The first exercise I did incorporated the use of range, letting the user type (raw_input), and append. In this exercise I had to add code that asked the user what their hobbies were. And the question repeated 3 times, then printed them after I answered 3 times. (range number on line 5)

EXERCISE #1 USING RANGE


  • The second exercise I did was string manipulation. Basically to make it simpler, I was told to 'substitute' a certain character I didn't want for a different one. If that was confusing, look at the image provided below for a clearer visualization.

MANIPULATION EXERCISE

As you can see from the photo, the code states that every letter A should be replaced with the letter X. The result is on the right.


  • The third exercise was simple, as all I had to do was make one character span to one line each. It's kind of hard for me to explain how this one works, but I just used for and in, to print the words out.

PRINTING OUT EACH INDIVIDUAL CHARACTER


Finally, as always, there was a final review type of exercise to end off on. This one didn't require tons of coding, but it wasn't also super easy.


FINAL REVIEW

I had to use everything I learned in this unit. AKA the use of loops, and else. Also I had to use a few old codes I already knew. Like using variables obviously, and for and in.



WHAT I WILL BE DOING TOMORROW / NEXT TIME:


Next time I will move onto a new lesson/unit called 'Practice Makes Perfect.' Since 'Loops' was actually a new unit, I would say that the new thing I have to work on is probably a review-type lesson to practice. (meaning I can't guarantee if I'll learn anything new that day.)

PREVIEW OF WHAT I'M DOING NEXT


Even the description of the next lesson is self-explanatory. It looks like I will be mainly practicing next time!

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