Introduction to Python programming
Course Description
This three day course is a practical introduction to Python 3, not an academic overview of syntax and grammar. Participants will immediately be able to use Python to complete tasks in the real world. Participants are expected to be design and evaluation engineers with some programming experience (in another language). This is a hands-on programming class. All concepts are reinforced by informal practice during the lecture followed by graduated lab exercises.
3 Days
Contact us for pricing
Prerequisites
Some level of experience with at least one other programming language is desirable. This is not an Introduction to Programming course. Working/user level knowledge of an operating system such as Linux, Windows, or MacOS.Who should attend
Design and evaluation engineers with some programming experience (in another language).Learning Objectives
At the conclusion of this course, attendees will be able to:Design and program python applications using PyCharm / Spyder and Jupyter environments
Use the main flow of control elements in python
Choose the appropriate variable type when required
Use the different collection types, including lists, tuples and dictionaries
Write functions and pass parameters
Create classes and objects
Read, write and parse different types of files
Access operating system variables and automate tasks
Use Numpy and Pandas to represent data sets
Create mathematical models using Scipy, e.g using integrate and fast fourier transforms
Graph using matplotlib and other tools
Python basics
The Python environmentPyCharm or Spyder environment (or other)
Variables
Keywords
Built in functions
Variable types
Flow Control
if and elifConditional expressions
Relational operators
Boolean operators
while loops
Alternate ways to exit a loop
Functions
Defining a functionFunction parameters
Global variables
Variable scope
Returning values
Modules and Packages
The import statementZipped libraries
Creating Modules
Packages
Lists and Tuples
About sequencesLists
Indexing and slicing
Iterating through a sequence
Functions for all sequences
Using enumerate
Operators and keywords for sequences
The xrange() function
Working with files
Text file I/OOpening a text file
The with block
Reading a text file
Writing to a text file
"Binary" (raw, or non-delimited) data
Exception handling
ExceptionsHandling exceptions with try
Handling multiple exceptions
Handling generic exceptions
Ignoring exceptions
Using else
Cleaning up with finally
re-raising exceptions
Raising a new exception
The standard exception hierarchy
Dictionaries and sets
About dictionariesWhen to use dictionaries
Creating dictionaries
Getting dictionary values
Iterating through a dictionary
Reading file data into a dictionary
Functional Programming
Creating functions with no side effectsLambda expressions
Reduce
Decorators in Python
OS Services and Task Automation
The OS moduleEnvironment variables
Launching external processes
Paths, directories, and filenames
Walking directory trees
Dates and times
Sending email
Other tasks
Classes
Defining classesInstance objects
Instance attributes
Methods
Properties
Class data
Inheritance
Pseudo-private variables
Static methods
Jupyter
Tab completionMagic commands
Benchmarking
External commands
Enhanced help
Notebooks
Scipy
About scipyPolynomials
Integrate and interpolate
Vectorizing functions
Fftpack
Numpy
ObjectivesPython's scientific stack
numpy overview
Creating arrays
Creating ranges
Working with arrays
Shapes
Slicing and indexing
Indexing with Booleans
Stacking
Iterating
Pandas
About pandasArchitecture
Series
DataFrames
Index Objects
Basic Indexing
Broadcasting
matplotlib
About matplotlibmatplotlib architecture
How to set up your plt
Alternatives to matplotlib – e.g ggplot2
Task automation
Developing an automation pipelineReal world automation problem
PythonPython ProgrammingPython 3Midas Skillnet