Home Page Icon
Home Page
Table of Contents for
Part III Selected Topics
Close
Part III Selected Topics
by Mark J. Johnson
A Concise Introduction to Programming in Python
Preliminaries
Series
Code Listings
Preface
To Instructors
Feedback
Acknowledgments
About the Author
Part I Foundations
Chapter 1 Computer Systems and Software
The CPU and RAM
Computer Languages
Compilation and Interpretation
The Python Interpreter
A Python Program
Why Computer Science?
Chapter 2 Python Program Components
Variables
Program Statements and Syntax
Data Types
Expressions
Comments
Recap
Chapter 3 Functions
Defining a Function
Calling a Function
Return Statements
Local Variables
Type Conversions
Testing
Chapter 4 Repetition: For Loops
For Loops
Range
Assignment Shorthands
Accumulation Loops
Runaway Loops
Chapter 5 Computer Memory: Integers
Bits and Bytes
Binary Numbers
Hexadecimal Numbers
Storing Integers
Memory Sizes
Chapter 6 Selection: If Statements
Boolean Expressions
If Statements
Python Turtle Module
Using the Python Documentation
Import Star
Multiple Return Values
Chapter 7 Algorithm Design and Debugging
Developing Algorithms
Comparing Algorithms
Debugging
Chapter 8 Repetition: While Loops
While Loops
Mod Operation
Print Options
Tracing Code by Hand
Nested Loops
Project: Newton’s Method
Chapter 9 Computer Memory: Floats
Binary Fractions
Moral: Use Inequalities with Floats
Chapter 10 Simulation
Random Numbers
Default Arguments
Functions as Parameters
Project: Visualization
Figure 10.1
Figure 10.1
Figure 10.2
Figure 10.3
Part II Collections and Files
Chapter 11 Strings
Indexing
Slicing
Concatenation
In and Not In
Chapter 12 Building Strings
String Accumulators
Loops over Strings
Escape Sequences
Project: ISBN Check Digits
Conditional Expressions
Chapter 13 Computer Memory: Text
Chapter 14 Lists
Lists
Lists Are Like Strings
Lists Are Also Not Like Strings
Random Functions for Lists
Objects and Object Methods
Method Calls
List Methods
Project: Program Performance
Project: Heat Diffusion
Chapter 15 Files
Files
With Statements
File Methods
File Loops
Splitting Strings
Multiple Method Calls
Chapter 16 String Methods
String Methods
The is Comparison
Multiple Assignment and Return
Constants
Import without From
Accessing Web Pages
Project: File Compression
Chapter 17 Mutable and Immutable Objects
Object State
Using Reassignment
Converting to a Mutable Type
Project: Hangman
Software Development
Chapter 18 Dictionaries
Command Line Execution
Dictionaries
Dictionary Operations
Dictionary Methods
Dictionary Loops
Project: ELIZA
Project: Shannon Entropy
Example: Low Entropy
Example: Higher Entropy
Logs
Exercise
Project: Reading DNA Frames
Reading Frames
FASTA Data Files
Part III Selected Topics
Chapter 19 Sound Manipulation
WAV Files
WAV File Parameters and Frames
Tuples Are Immutable Lists
Data Arrays
Context Managers
Chapter 20 Sound Synthesis
Sound Waves
Musical Notes and Frequencies
Frequency and Sine Functions
Figure 20.1
Figure 20.1
Figure 20.2
Figure 20.3
Chapter 21 Image Manipulation
Computer Memory: Images
RGB Color
PPM Images
ImagePPM Objects
Modifying Images
Luminance
Object Fields
What about f?
Project: Image Filters
Applying Filters
Chapter 22 Image Synthesis
Complex Numbers
Complex Numbers in Python
Parameter Tuples
Linear Interpolation
Chapter 23 Writing Classes
Object-Oriented Terminology
Class Definitions
Field Definitions
Method Definitions
Method Calls Inside a Class
Special Methods: __init__() and __str()__
Calling Constructors
Chapter 24 Cooperating Classes
Abstraction
Importing From Your Own Modules
if __name__ == "__main__":
List Comprehensions
Map
Case Study: PPM Image Class
Class Methods
PPM Image Formats
Chapter 25 Related Classes
The Turtle Class
Inheritance
Superclass Initializer
Class Variables
Chapter 26 Functional Programming
Programming Paradigms
Program Overview
Iterators and Iterables
Grouping List Elements
Lambda Expressions
Recursion
Chapter 27 Parallel Programming
Multiprocessing
Python Multiprocessing Pools
Chapter 28 Graphical User Interfaces
The tkinter Module
Event-Driven Programming
Window Methods
Widgets
Widget Options
IntVar and StringVar
Geometry Managers
Multiple Inheritance
PhotoImages
Bibliography
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Project: Reading DNA Frames
Next
Next Chapter
Chapter 19 Sound Manipulation
Part III
Selected Topics
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset