Absolute Beginner's Python Programming Full Color Guide with Lab Exercises: The Illustrated Guide to Learning Computer Programming (Illustrated Coding)

Written as an illustrated, step-by-step guide and workbook for complete beginners, this illustrated, full color book wil

361 116 14MB

English Pages 238 Year 2022

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
Intro to Computer Programming 16
Introducing Python 17
Setting Up 18
Install on Windows 18
Install on MacOS 22
Install on Linux 23
Setup a Coding Environment 25
Lab Exercises 27
The Basics 28
Language Classification 29
Low-Level Language 29
High-Level Language 30
Object Oriented Programming 31
Class 31
Object 31
Attribute 31
Method 31
Python Language Syntax 32
Reserved Words 32
Identifiers 33
Variables 33
Indentation 34
Comments 34
Input 34
Output 35
Functions 36
Writing a Program 36
Lab Exercises 41
Working with Data 42
Basic Data Types 43
Integers 43
Floating Point Numbers 43
Strings 43
Lists 46
Two Dimensional Lists 49
Sets 51
Tuples 52
Dictionaries 53
Casting Data Types 55
Arithmetic Operators 56
Operator Precedence 56
Performing Arithmetic 56
Comparison Operators 57
Boolean Operators 57
Bitwise Operators 58
Lab Exercises 59
Flow Control 60
Sequence 61
Selection 63
if...else 63
elif 65
Iteration (Loops) 67
For loop 67
While loop 70
Break and Continue 72
Lab Exercises 73
Handling Files 74
File Types 75
Text File 75
Binary 75
Text File Operations 75
Open Files 76
Write to a File 77
Read from a File 79
Binary File Operations 80
Open Files 80
Write to a File 81
Read a File 83
Random File Access 84
File Handling Methods 86
Lab Exercises 87
Using Functions 88
What are Functions 89
Built in Functions 90
User Defined Functions 91
Scope 93
Recursion 93
Lab Exercises 97
Using Modules 98
Importing Modules 98
Creating your Own Modules 99
Lab Exercises 101
Exception Handling 102
Types of Exception 103
Catching Exceptions 104
Raising your Own Exceptions 105
Object Oriented Programming 106
Class 107
Object 107
Attribute 107
Method 108
Principles of OOP 108
Encapsulation 108
Inheritance 108
Polymorphism 108
Abstraction 108
Classes & Objects 109
Inheritance 113
Polymorphism 117
Lab Exercises 121
Turtle Graphics 122
Importing Turtle Graphics Module 123
Turtle Commands 123
Customize the Turtle Window 125
Looping Commands 126
Lab Exercises 129
Building an Interface 130
Creating a Window 131
Adding Widgets 133
Menus 133
The Canvas 134
Images 137
Buttons 137
Message Boxes 138
Text Field 139
Listbox 140
Checkbox 141
Labels 142
Label Frame 143
Interface Design 144
Developing a Game 148
Installing PyGame 149
Opening a Window 150
Adding an Image 151
The Game Loop 152
The Event Loop 153
Shapes 156
Basic Animation 157
Putting it all together 163
Lab Exercises 167
Mini Project 167
Python Web Development 168
Web Servers 169
Installing a Web Server 170
Set up Python Support 170
Where to Save Python Scripts 173
Executing a Script 174
Python Web Frameworks 177
Resources 182
Using the Videos 183
Downloading Example Code 184
Scanning the Codes 186
iPhone 186
Android 187

Absolute Beginner's Python Programming Full Color Guide with Lab Exercises: The Illustrated Guide to Learning Computer Programming (Illustrated Coding)

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers