Python Programming
Course Description
On this course students will learn the design philosophy and strengths of Python and run-time features assisting rapid development. You will be able to programme using loops, lists, variables and dictionaries. You will be able to use operators such as `and`, `in`, %, == and `is`. You will also be able to read and write data to files and use the % operator for string-formatting, be able to use existing Python modules and create new ones, use exceptions for error-handling and create Object-Oriented Python using the `class` keyword.
3 Days
Contact us for pricing
Prerequisites
Participants should be familiar with basic programming constructs such as variable assignment, conditions, loops and I/O. Programming experience in a procedural language such as C or Pascal, or an OO Language such as Java, C++. The more practical coding experience the better.Language Fundamentals
Command-Line InterpreterInteger, Float, String
Basic operations (=, +, *, -, /, %)
Type conversations
Equality
Python Scripting
Running a Python scriptProviding command-line arguments
Syntax and indentation
List operations: creating, slicing, iterating
Range operation
String operations
Modules and Functions
Running a main routine in moduleCalling a function from main
Calling a function from another module
Local and global variables, pass-by-value to function
Comments (#)
Different forms of import
PYTHONPATH
Calling functions with default arguments
Flow of Control
For and While loopsConditionals (if)
Exception handling
Advanced Data Objects
Creating and using tuple data objectsCreating and using dictionary data objects
References and copies (id, copy)
Type
Built-in operators (dir)
Input/Output
Reading from and writing to console (%)Reading from and writing to file
The String Module
Module documentation (pydoc)
Useful Modules
Randomization whrandomTime/Date time
os, os.path
Mathematics math
thread
glob
unittest
StringIO
Object-Oriented Python
Classes and objectsOverriding built-in methods
Inheritance and polymorphism
Advanced Parsing
Regular Expressions (re)Useful Idioms and Shortcuts
maplambda
reduce
type conversations
PythonPython Programming