ebook img

Python Flash Cards: Syntax, Concepts, and Examples PDF

204 Pages·2019·1.033 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Python Flash Cards: Syntax, Concepts, and Examples

From the best-selling author of Python Crash Course P Y T H O N F L A S H C A R D S 101 CARDS ERIC MATTHES 1 ConCepts and VoCabulary ConC ep ts and VoCabul ary These cards introduce a variety of important programming concepts. Understanding these concepts will help you make sense of the relevant syntax when you get to it, in Python or any other language you choose to study. You can read these cards as a set before moving on to the syntax cards, or you might visit relevant concepts here as you work on individual topics from the syntax cards. 1.1 Programming 1.19 Databases Languages 1.20 Data Structures 1.2 Operating Systems and Types 1.3 Terminal 1.21 Variables 1.4 Text Editors 1.22 Strings 1.5 IDEs 1.23 Numerical Data Types 1.6 Comments 1.24 Sequences 1.7 Style Guides 1.25 Mappings 1.8 Project Specifications 1.26 Functions 1.9 Syntax 1.27 Classes 1.10 Debugging 1.28 Inheritance 1.11 Refactoring 1.29 Other Data Types 1.12 Standard Library 1.30 if Statements 1.13 Third-Party 1.31 Loops Libraries 1.32 Modules 1.14 Frameworks 1.33 Saving State 1.15 Error Handling 1.16 Version Control 1.17 Testing 1.18 User Interfaces progr amming l anguages • What is a programming language? • What’s unique about Python? • How does a programming language affect the way we think about solving problems? 1.1 A programming language is a set of rules for giving instructions to a computer. It provides the syntax for giving instructions and specifies the ways to store information, and it controls the order in which instructions are executed in a program. Python is a high-level programming language, which means it takes care of many low-level tasks for you so you can focus on solving problems. For example, when you assign a value to a variable, Python deletes the variable automatically when it’s no longer needed, sparing you from having to manage memory. Every language has unique features that lead to charac- teristic programming styles and philosophies. Python focuses on simplicity, readability, and getting the job done. oper ating systems • What is an operating system? • What does an operating system do? • How does Python interact with the operating system? 1.2 The operating system (OS) is the software that con- trols the computer’s inner workings. An operating system performs low-level functionality, such as reading from and writing to memory, and interacts with hardware devices, like hard drives, RAM, CPU, graphics processors, displays, batteries, and other external devices. Windows, macOS, and Linux (such as Ubuntu and Fedora) are major operating systems. Python is a cross-platform programming language. You can write Python code on any OS, and it will run on any other OS. terminal • What is a terminal? • How do you run a Python program from a terminal? • How do you start a Python session from a terminal? 1.3 A terminal is a program that allows you to interact with the OS, and it is often referred to as the con- sole or command line. You use a terminal (rather than going through a GUI) to issue clear, concise, text-based commands to the OS to quickly perform tasks. You can run a Python program from a terminal using a command like this: $ python hello_world.py You can also start a Python session in a terminal. In a Python terminal session, each line of code executes as soon as you enter it: $ python >>> print("Hello, terminal world!") Hello, terminal world! te x t e ditors • What is a text editor? • What is syntax highlighting? • What are some beginner-friendly text editors? • What are some more advanced text editors? 1.4

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.