This week we were exposed to some of Python's different data types (strings, numbers, and lists), performed basic math operations in Python, identified the basic functions of variables, strings, and lists, distinguished between Python statements (an instruction that tells the computer to do something) and expressions (a value), Python functions and Python methods. Python functions (like length, type or range) are typically formatted function(parameters or arguments) and returns a value. Python methods (similar to python functions only closely coupled with an object) are generally formatted object.method(arguments).
In lab this week we practiced some of the basic, fundamental features of Python scripting. We learned to assign different types of variables, such as strings, lists, integers, and floating-point numbers. We manipulated those variables, or creating interaction between them,
The lab assignment, to write the following script: started with assigning a variable to my name as a string, then to split the string for my last name, print my last name, find the length of my last name, and multiply the length by 3. After writing the script to run the script (seen above).
No comments:
Post a Comment