
Nguồn ngoài
Python for Everybody
Writing programs (or programming) is a very creative and rewarding activity. You can write programs for many reasons, ranging from making your living to solving a difficult data analysis problem to having fun to helping someone else solve a problem. This book assumes that everyone needs to know how to program, and that once you know how to program you will figure out what you want to do with your newfound skills.
- Tác giả
- Chuck Severance
- Nhà xuất bản
- University of Michigan
- Nguồn
- LibreTexts
- Giấy phép
- CC BY-NC-SA
- Ngôn ngữ
- EN
- Danh mục
- Công nghệ thông tin
Mục lục· 202 mục
- 01: Introduction
- 1.0E: 1.E: Introduction (Exercises)
- 1.0G: 1.G: Introduction (Glossary)
- 1.01: Why should you learn to write programs
- 1.02: Creativity and Motivation
- 1.03: Computer Hardware Architecture
- 1.04: Understanding Programming
- 1.05: Words and Sentences
- 1.06: Conversing with Python
- 1.07: Terminology - Interpreter and Compiler
- 1.08: Writing a Program
- 1.09: What is a program
- 1.10: The Building Blocks of Programs
- 1.11: What could possibly go wrong
- 1.12: The Learning Journey
- 02: Variables Expressions and Statements
- 2.0E: 2.E: Variables Expressions and Statements (Exercises)
- 2.0G: 2.G: Glossary
- 2.01: Values and Types
- 2.02: Variables
- 2.03: Variable names and Keywords
- 2.04: Statements
- 2.05: Operators and Operands
- 2.06: Expressions
- 2.07: Order of Operations
- 2.08: Modulus Operator
- 2.09: String Operations
- 2.10: Asking the user for input
- 2.11: Comments
- 2.12: Choosing Mnemonic Variable Names
- 2.13: Debugging
- 03: Conditional Execution
- 3.0E: 3.E: Conditional Execution (Exercises)
- 3.0G: 3.G: Conditional Execution (Glossary)
- 3.01: Boolean Expressions
- 3.02: Logical Operators
- 3.03: Conditional Execution
- 3.04: Alternative Execution
- 3.05: Chained Conditionals
- 3.06: Nested Conditionals
- 3.07: Catching exceptions Using Try and Except
- 3.08: Short-Circuit Evaluation of Logical Expressions
- 3.09: Debugging
- 04: Functions
- 4.0E: 4.E: Functions (Exercises)
- 4.0G: 4.G: Functions (Glossary)
- 4.01: Function Calls
- 4.02: Built-in Functions
- 4.03: Type Conversion Functions
- 4.04: Random Numbers
- 4.05: Math Functions
- 4.06: Adding New Functions
- 4.07: Definitions and Uses
- 4.08: Flow of Execution
- 4.09: Parameters and Arguments
- 4.10: Fruitful functions and void functions
- 4.11: Why functions
- 4.12: Debugging
- 05: Iterations
- 5.0E: 5.E: Iterations (Exercises)
- 5.0G: 5.G: Iterations (Glossary)
- 5.01: Updating Variables
- 5.02: The while Statement
- 5.03: Infinite Loops
- 5.04: Infinite loops and break
- 5.05: Finishing iterations with continue
- 5.06: Definite loops using for
- 5.07: Loop patterns
- 5.08: Counting and Summing Loops
- 5.09: Maximum and Minimum Loops
- 5.10: Debugging
- 06: Strings
- 6.0E: 6.E: Strings (Exercises)
- 6.0G: 6.G: Strings (Glossary)
- 6.01: A string is a sequence
- 6.02: Getting the length of a string using len
- 6.03: Traversal through a string with a loop
- 6.04: String Slices
- 6.05: Strings are immutable
- 6.06: Looping and Counting
- 6.07: The in operator
- 6.08: String Comparison
- 6.09: String Methods
- 6.10: Parsing strings
- 6.11: Format operator
- 6.12: Debugging
- 07: Files
- 7.0E: 7.E: Files (Exercises)
- 7.0G: 7.G: Files (Glossary)
- 7.01: Persistence
- 7.02: Opening Files
- 7.03: Text files and Lines
- 7.04: Reading Files
- 7.05: Searching through a File
- 7.06: Letting the user choose the file name
- 7.07: Using try except and open
- 7.08: Writing Files
- 7.09: Debugging
- 08: Lists
- 8.0E: 8.E: Lists (Exercises)
- 8.0G: 8.G: Lists (Glossary)
- 8.01: A list is a sequence
- 8.02: Lists are mutable
- 8.03: Traversing a List
- 8.04: List operations
- 8.05: List Slices
- 8.06: List Methods
- 8.07: Deleting Elements
- 8.08: Lists and Functions
- 8.09: Lists and Strings
- 8.10: Parsing lines
- 8.11: Objects and Values
- 8.12: Aliasing
- 8.13: List arguments
- 8.14: Debugging
- 09: Dictionaries
- 9.0E: 9.E: Dictionaries (Exercises)
- 9.0G: 9.G: Dictionaries (Glossary)
- 9.01: Dictionaries
- 9.02: Dictionary as a Set of Counters
- 9.03: Dictionaries and Files
- 9.04: Looping and Dictionaries
- 9.05: Advanced Text Parsing
- 9.06: Debugging
- 10: Tuples
- 10.0E: 10.E: Tuples (Exercises)
- 10.0G: 10.G: Tuples (Glossary)
- 10.01: Tuples are Immutable
- 10.02: Comparing Tuples
- 10.03: Tuple Assignment
- 10.04: Dictionaries and Tuples
- 10.05: Multiple assignment with dictionaries
- 10.06: The most common words
- 10.07: Using Tuples as Keys in Dictionaries
- 10.08: Sequences- strings lists and tuples - Oh My
- 10.09: Debugging
- 11: Regular Expressions
- 11.0E: 11.E: Regular Expressions (Exercises)
- 11.0G: 11.G: Regular Expressions (Glossary)
- 11.0S: 11.S: Regular Expressions (Summary)
- 11.01: Regular Expressions
- 11.02: Character matching in regular expressions
- 11.03: Extracting data using regular expressions
- 11.04: Combining searching and extracting
- 11.05: Escape Character
- 11.06: Bonus section for Unix Linux users
- 11.07: Debugging
- 12: Networked Programs
- 12.0E: 12.E: Networked Programs (Exercises)
- 12.0G: 12.G: Networked Programs (Glossary)
- 12.01: HyperText Transfer Protocol - HTTP
- 12.02: The World's Simplest Web Browser
- 12.03: Retrieving an image over HTTP
- 12.04: Retrieving web pages with urllib
- 12.05: Parsing HTML and scraping the web
- 12.06: Parsing HTML using regular expressions
- 12.07: Parsing HTML using BeautifulSoup
- 12.08: Reading binary files using urllib
- 13: Python and Web Services
- 13.0E: 13.E: Python and Web Services (Exercises)
- 13.0G: 13.G: Python and Web Services (Glossary)
- 13.01: eXtensible Markup Language - XML
- 13.02: Looping through Nodes
- 13.03: JavaScript Object Notation - JSON
- 13.04: Parsing JSON
- 13.05: Application Programming Interfaces
- 13.06: Google geocoding web service
- 13.07: Security and API usage
- 14: Object-Oriented Programming
- 14.0G: 14.G: Object-Oriented Programming (Glossary)
- 14.0S: 14.S: Object-Oriented Programming (Summary)
- 14.01: Managing Larger Programs
- 14.02: Getting Started
- 14.03: Using Objects
- 14.04: Starting with Programs
- 14.05: Subdividing a Problem - Encapsulation
- 14.06: Our First Python Object
- 14.07: Classes as Types
- 14.08: Many Instances
- 14.09: Object Lifecycle
- 14.10: Inheritance
- 15: Using Databases and SQL
- 15.0G: 15.G: Using Databases and SQL (Glossary)
- 15.0S: 15.S: Using Databases and SQL (Summary)
- 15.01: What is a database
- 15.02: Database Concepts
- 15.03: Database Browser for SQLite
- 15.04: Creating a database table
- 15.05: Structured Query Language summary
- 15.06: Spidering Twitter using a database
- 15.07: Basic data modeling
- 15.08: Programming with Multiple Tables
- 15.09: Constraints in Database Tables
- 15.10: Retrieve and or insert a record
- 15.11: Storing the friend relationship
- 15.12: Three Kinds of Keys
- 15.13: Using JOIN to retrieve data
- 15.14: Degugging
- 16: Visualizing data
- 16.01: Building a Google map from geocoded data
- 16.02: Visualizing Networks and Interconnections
- 16.03: Visualizing mail data