Thursday 10 October 2019

Python - Day Eight (October)

WHAT I DID TODAY:


Today I have completed all 11 lessons on the unit 'PygLatin' that I intended to do. Now I have completed 25% of the 'Python 2' course.


25% COMPLETE

After completing this though, it felt more like a small project and not an actual unit. I did learn things, but it wasn't a lot because it mainly consisted of things I've learned throughout the past.


THE FINISHED TRANSLATOR

This may look a bit confusing, but basically the point of this translator is that you type a word in, and returns back as a 'PygLatin translated version.' If I just enter a whole alphabetical string, it will just return back as all lower case letters and the first letter of the word printed will go the back and 'ay' will be added to the end. I actually don't really understand how and why this would be needed yet but maybe I will find out in the near future.



WHAT I LEARNED:


I did not learn many things, rather I just integrated the things I've learned before. So it's just a few new things I've learned..

  • The first thing I learned was a code or function. And that is raw_input() It's the most important thing I learned this unit because it's like the base/foundation of this translator. This code basically accepts a string, prints it, and then waits for the user to type something and press Enter (or Return) I think it'll be hard to understand just by reading and not actually doing it, but here's an example.

VISUAL EXAMPLE OF WHAT I SAID

(The last line #6 is just basically an extra one and not mandatory, it just asks the same question without erasing the first answer)


  • The second thing I learned was the .isalpha() code. This code is helpful because it can be used with many other codes such as if and and statements. This code checks to see if a string contains letters. This can be used many ways , but the way I was told to use it was if there's non-letter characters in the string, the word will not print.

THE REPLY WAS 'empty' BECAUSE MY 'WORD' CONTAINED NUMBERS


WHAT I WILL BE DOING TOMORROW / NEXT TIME:


Next time as usual, I'm planning to continue on with the Python 2 course. I am doing the unit 'Functions' next.

DESCRIPTION OF WHAT THE UNIT IS ABOUT

There are a total of 19 lessons in this unit. I will definitely not be able to go through them all, so I think I just do what I usually do and go through half or a bit more then do the rest the other 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 ...