Python Introductory Workshop
Abhimanyu Hans
Data Services Assistant at GIS and Data Labs
UMD Libraries
Who We Are: GIS and Data Lab at UMD Libraries
Other Upcoming Workshops
GIS
Data Science/Viz
Library calendar for all workshops
Agenda
Attendees Survey Alert!
Python Background
Why Python?
TIOBE Programming Community Index
Source: https://www.tiobe.com/tiobe-index/
Where is Python Used
Python Installation
Instructions shared via email
Install Python
Integrated Development Environment (IDEs)
Jupyter Notebooks
Jupyter Notebooks
Getting Started with Jupyter
Syntax Introduction
Running Example:
1. Solving quadratic equation
2. FizzBuzz Problem
Variables vs Literals
Basic Data Types
Variable Manipulation: Mathematical Operations
Variable Manipulation: String Operations
Collection Data Types
List Declaration:
Variable Declaration + Square Brackets
List Concatenation / Join (½)
List Concatenation / Join (2/2)
List Append
List Sorting (½)
[-122, -19, 23, 30, 53, 100, 100.05]
List Sorting (2/2)
Dictionary
Dictionary Declaration
Dictionary Retrieve Data Using Keys
Dictionary: Add key-value pair in existing dict
Functions
Simple Example of Function
Function (Contd.)
Quadratic Formula via Function
Boolean Operators
Equal To, Greater Than, Greater Than Equal To, etc.
Conditionals: If/Else
Remember, not ALL If/Else have ELSE block present.
If / Else Example: Odd or Even Number
For Loop
For Loop: Printing elements of a List
FizzBuzz Problem
Feedback Survey Alert!
Thank you! :-)