Thông tin tài liệu
[...]... in Python 2 into syntax Python 3 can use Python 2 will eventually be replaced by Python 3 This book teaches programming using Python 3 Key Point general-purpose programming language interpreted object-oriented programming (OOP) Python 2 vs Python 3 14 Chapter 1 Introduction to Computers, Programs, and Python ✓ Check Point 1.21 Python is interpreted What does that mean? 1.22 Can a program written in Python. .. free from the Python Software Foundation Two versions of Python are currently coexistent: Python 2 and Python 3 The programs written in Python 3 will not run in Python 2 Python 3 is a newer version, but it is not backward-compatible with Python 2 This means that if you write a program using the Python 2 syntax, it may not work with a Python 3 interpreter Python provides a tool that automatically converts... 506 CHAPTER 1 INTRODUCTION TO COMPUTERS, PROGRAMS, AND PYTHON Objectives ■ To demonstrate a basic understanding of computer hardware, programs, and operating systems (§§1.2–1.4) ■ To describe the history of Python (§1.5) ■ To explain the basic syntax of a Python program (§1.6) ■ To write and run a simple Python program (§1.6) ■ To explain the importance of, and provide examples of, proper programming. .. programmers try to master as many different programming languages as they can, giving them access to a vast arsenal of software-development tools If you learn to program using one language, you should find it easy to pick up other languages The key is to learn how to solve problems using a programming approach That is the main theme of this book You are about to begin an exciting journey: learning how to program... (§1.7) ■ To explain the differences between syntax errors, runtime errors, and logic errors (§1.8) ■ To create a basic graphics program using Turtle (§1.9) 2 Chapter 1 Introduction to Computers, Programs, and Python 1.1 Introduction Key Point what is programming? program programming languages The central theme of this book is to learn how to solve problems by writing a program This book is about programming. .. run in Python 3? 1.23 Can a program written using Python 3 run in Python 2? 1.6 Getting Started with Python Key Point console console input console output A Python program is executed from the Python interpreter Let’s get started by writing a simple Python program that displays the messages Welcome to Python and Python is fun on the console The word console is an old computer term that refers to the... Console input means to receive input from the keyboard and console output means to display output to the monitor Note You can run Python on the Windows, UNIX, and Mac operating systems For information on installing Python, see Supplement I.B, Installing and Using Python, on the Companion Website install Python VideoNote Start with Python IDLE 1.6.1 Launching Python Assume you have Python installed on... even toasters On a personal computer, you use word processors to write documents, Web browsers to explore the Internet, and e-mail programs to send messages These programs are all examples of software Software developers create software with the help of powerful tools called programming languages This book teaches you how to create programs by using the Python programming language There are many programming. .. APPENDIXES A Python Keywords B The ASCII Character Set C Number Systems INDEX CREDITS 16-1 17-1 18-1 19-1 20-1 21-1 22-1 23-1 533 534 536 541 557 CONTENTS Chapter 1 Introduction to Computers, Programs, and Python 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 Introduction What Is a Computer? Programming Languages Operating Systems The History of Python Getting Started with Python Programming Style and Documentation Programming. .. machine Note that Python (command line) FIGURE 1.11 You can launch Python from the command window FIGURE 1.12 You can use Python from IDLE 1.6 Getting Started with Python 15 Python IDLE Python command line Enter Python here FIGURE 1.13 You can launch the Python IDLE and command line from the Start button and IDLE can also be accessed directly from the Windows Start button by searching for Python (command . Munich Paris Montreal Toronto
Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo
INTRODUCTION TO
PROGRAMMING USING
PYTHON
Y. Daniel. Installing and Using Python
C. Python IDLE
D. Python on Eclipse
E. Python on Eclipse Debugging
F. Python Coding Style Guidelines
Part II. Advanced Python Topics
A.
Ngày đăng: 24/03/2014, 01:21
Xem thêm: Introduction to Programming Using Python pptx, Introduction to Programming Using Python pptx, 5 Variables, Assignment Statements, and Expressions, 12 Case Study: Displaying the Current Time, 4 Case Study: Minimum Number of Coins, 2 Boolean Types, Values, and Expressions, 9 Case Study: Computing Body Mass Index, 8 Case Study: Converting Decimals to Hexadecimals, 12 Case Study: Generating Random ASCII Characters, 4 Case Study: Converting Hexadecimals to Decimals, 11 Mouse, Key Events, and Bindings, 9 Case Study: Counting the Occurrences of Each Letter, 6 GUI: Finding the Closest Pair, 9 Case Study: Designing the Course Class, 4 Case Study: Counting Each Letter in a File, 6 Case Study: Finding the Directory Size