Python Fundamentals
This week in GIS Programming, we learned about the basics of Python, including working with string variables, function and method calls, importing modules, running and saving Python script using Notebook in ArcGIS Pro, including comments in scripts, creating loops and conditional statements, and using iterate variables within loops to control script workflow.
In this activity assigned, I split and printed my full name, I fixed errors in a pre-written code for a dice game, which was ran, created a loop that added 20 random numbers between 0 and 10 to a list, then created a loop that removed a chosen integer from this list, and concluding with printing statements on the outcome of the random number selected, the instances of its occurrence, and an updated listed without the chosen number.
This flowchart shows the workflow for the activity:
Comments
Post a Comment