Goal: Explains file handling, reading files, writing to files, text files, binary files
File Types
Text File
Binary
Text File Operations
Open Files
Write to a File
Read from a File
Binary File Operations
Open Files
Write to a File
Read a File
Random File Access
Lab Exercises
Chapter 6: Using Functions
Sub-topics
Declaring Functions
Recursion
Lab Exercises
Chapter 7: Exception Handling
Goal: Covers exception and error handling
Sub-topics
Types of Exception
Catching Exceptions
Raising your Own Exceptions
Chapter 8: Object Oriented Programming
Goal: OOP principles, classes, objects and inheritance
Sub-topics
Principles of OOP
Encapsulation
Inheritance
Polymorphism
Abstraction
Classes & Objects
Class Inheritance
Polymorphic Classes
Method Overriding
Chapter 9: Building an Interface
Goal: Building an interface using tkinter
Sub-topics
Creating a Window
Adding Widgets
Menus
The Canvas
Images
Buttons
Message Boxes
Text Field
Listbox
Checkbox
Labels
Label Frame
Interface Design
Chapter 10: Developing a Game
Sub-topics
Installing PyGame
Opening a Window
Adding an Image
The Game Loop
The Event Loop
Shapes
Basic Animation
Chapter 11: Python Web Development
Sub-topics
Web Servers
Executing a Script
Python Web Frameworks
Quick Reference
Data Types
Numeric Operators
Comparison Operators
Boolean Operators
String Operators
List Operators
Dictionary Operators
String Methods
List Methods
Dictionary Methods
Functions
Files
Conditional
Multi Conditional
While Loop
For Loop
Loop Control
Modules
Built in Functions
Declare a Class
Child Class
Create Object
Call Object Method
With over 20 years’ experience in the computer industry, Kevin Wilson has made a career out of technology and showing others how to use it. After earning a master's degree in computer science, software engineering, and multimedia systems, Kevin has held various positions in the IT industry including graphic & web design, digital film & photography, programming & software engineering, developing & managing corporate networks, building computer systems, and IT support. He currently teaches computer science at college and works as an IT trainer in England while researching for his PhD.
Written as an illustrated, step-by-step guide, this book will introduce you to Python with examples using the latest version of the language.
You'll begin by learning to set up your Python environment. The next few chapters cover the basics of Python such as language classifications, Python language syntax, and how to write a program. Next, you will learn how to work with variables, basic data types, arithmetic, companion, and Boolean operators, followed by lab exercises. Further, the book covers flow control, using functions, and exception handling, as well as the principles of object-oriented programming and building an interface design. The last section explains how to develop a game by installing PyGame and how to use basic animation, and concludes with coverage of Python web development with web servers and Python web frameworks.
The Absolute Beginners Guide to Python Programming will give you the tools, confidence, and inspiration to start writing Python programs. If you are a programmer, developer, or a student, or someone who wants to learn on their own, this book is for you.
You will:
Gain an understanding of computer programming
Understand different data and data types
Work with Classes and OOP
Build interfaces, simple games, and web development with Python