Monday 2 December 2019

Python - Day Twenty Five (December)

WHAT I DID TODAY:



Today I finished the remaining 9 lessons in the 'Advanced Topics in Python' unit that I couldn't finish last class. Just like last class, I was still working on the same topics as you may have guessed. But to review/sum it up again, I worked on dictionaries/lists, list slicing, and working with numbers.  That's what I did last class but also this class with different exercises.


I have completed 80% of the overall course now.


80% COMPLETED



I did a few simple exercises, and also a few reviews based on the topics mentioned above.



  • The first exercise just required me to count the numbers backwards by 10 starting from 100 or technically to be exact 101. This one was the easiest as it was very self-explanatory and only used 1-2 variables along with list slicing on line 4.
EXERCISE #1 COUNTING BACKWARDS BY 10


  • The second exercise, I had to use list slicing to make Python print only the numbers of 3 and 5. I feel like I already posted lots of similar exercises to this one but since it's something I did today, I'll post it again.
EXERCISE #2 COUNTING BY 3'S AND 5'S


  • The third exercise was 'decoding a secret message.' Basically, there was a hidden message that was backwards and only every second letter counted. Instead of an actual person having to decipher it, you can use coding to make the computer decipher it for you instead.
EXERCISE #3 SECRET MESSAGE


  • The final review I had to do will show an unfamiliar code that I will be explaining in the next section below. But this last review was a really short one that included variables, list slicing, and the new code. In this final review, I had to decipher a secret message once again, except this time I had to also use the new code/function.
FINAL REVIEW

( The code/function that may be unfamiliar is line 3. )




WHAT I LEARNED:


Today I only learned one new thing, but it's normal to not learn so many new things nowadays because I'm at a certain point where this Python course went through a lot already. 



  • The new function I learned was filter(lambda) This one slightly confuses me a bit, but I eventually started understanding it a bit more. This certain code is actually related to 'functional programming,' which means you're able to pass functions around just like variables/values. The function the lambda creates is an anonymous function.
EXAMPLE USE OF THE NEW FUNCTION

And the filter determines what to filter out from the 'lambda.' Lambda could potentially be the exact same as using the def function. 



WHAT I WILL BE DOING TOMORROW / NEXT TIME:


Next time I will move onto a new unit named,'Introduction to BitWise Operators.' Considering the title, I'm pretty sure I will be learning at least one new thing if not a bunch.

DESCRIPTION OF NEXT UNIT

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