GIS4102 GIS Programming, Dr. Derek Morgan
Python Fundamentals: part II
For the lab assignment, students completed an unfinished Python script, correcting some errors in it, and adding new blocks of code utilizing for and while loops. The result was a complete Python script, including a comments section containing their name and contact information, the date the script was completed, and a brief description of its purpose.
Student Learning Outcomes:
- Use and import modules
- Save Python code as scripts
- Include comments in scripts
- Correct script errors
- Create loops and conditional statements
- Iterate variables within loops
STUDENT SPOTLIGHT AWARDS
The following student was chosen for their exception work on the Python Fundamentals: part II assignment:
What we like: During the Module 4 lab assignment in GIS Programming students were asked to finish writing a script that performs a dice rolling game based on players’ name length, utilizing random numbers, and finally implementing a nested while loop. For students new to programming implementing their first conditional loop can be a conceptual challenge. Jessica showed creativity and persistence in completing this part of the lab assignment. When the assignment required the students to create a loop that removes an unlucky number, rather than simply selecting a number, she creatively utilized a previously learned function, random.randint(), to create a different unlucky number each time.
We like that Jessica added to and completed the documentation parts of her script. Finally, we like that she utilized the discussion forums which allowed other students to learn from her question. Below is her final result, way to go Jessica!