Labels

Saturday, May 23, 2015

GIS 4102: GIS Programming Module 2

Module 2: Python Fundamentals Part 1

This week’s assignment covered the use of variables, strings, lists, functions, methods, math, and conditional statements.  The script prints my last name and a number equal to three times the number of characters in my last name. 

The script creates several variables including:
·         A variable for my full name.
·         A variable to split my full name into a list.
·         A variable to store the length of my last name which is the second item on the list – index position 1.
·         A variable to store the result of the multiplication of the length of my last name times three (3).


The script uses the following functions and methods:
·         split method.
·         len function.

The script prints the values of the last name and result of the multiplication variables.

Below is a screen shot of the results of the script.

No comments:

Post a Comment