This week we begin with the fundamentals of Python- how it is structured, and how it handles various types of data, like text, numbers, and lists. Programming language, like communicative language, uses syntax, and the way various elements included are ordered and input makes the difference between a desired output and an angry red error message.
The output pictured above- my last name and the number 36- doesn't seem like much to produce, but the script used to create it took no small amount of effort. It was not a simple "print" (to the screen) command to return those values, but rather a structured script that took my full name, put my first, middle and last names into a list, extracted my last name from the list, took the number of letters in my last name, and finally output that number times 3. This process is completed in with Python script, using variable assignments, functions, methods and expressions. It is a fairly basic procedure, and may seem a bit arbitrary, but the concepts learned and mastered therein are essential to the development of a decent working knowledge of Python. It is upon these basic skills we build a greater understanding and mastery of the programming language.
No comments:
Post a Comment