ALERT: Before you purchase, check with your instructor or review your course syllabus to ensure that you select the correct ISBN. Several versions of Pearson's MyLab & Mastering products exist for each title, including customized versions for individual schools, and registrations are not transferable. In addition, you may need a CourseID, provided by your instructor, to register for and use Pearson's MyLab & Mastering products. Packages Access codes for Pearson's MyLab & Mastering products may not be included when purchasing or renting from companies other than Pearson; check with the seller before completing your purchase. Used or rental books If you rent or purchase a used book with an access code, the access code may have been redeemed previously and you may have to purchase a new access code. Access codes Access codes that are purchased from sellers other than Pearson carry a higher risk of being either the wrong ISBN or a previously redeemed code. Check with the seller prior to purchase. --In Starting Out with Python (R), Second Edition Tony Gaddis' evenly-paced, accessible coverage introduces students to the basics of programming and prepares them to transition into more complicated languages. Python, an easy-to-learn and increasingly popular object-oriented language, allows readers to become comfortable with the fundamentals of programming without the troublesome syntax that can be challenging for novices. With the knowledge acquired using Python, students gain confidence in their skills and learn to recognize the logic behind developing high-quality programs.Starting Out with Python discusses control structures, functions, arrays, and pointers before objects and classes. As with all Gaddis texts, clear and easy-to-read code listings, concise and practical real-world examples, detail-oriented explanations, and an abundance of exercises appear in every chapter. This text is intended for a one-semester introductory programming course for students with limited programming experience.
Les mer
Preface xiChapter 1 Introduction to Computers and Programming 11.1 Introduction 11.2 Hardware and Software 21.3 How Computers Store Data 81.4 How a Program Works 131.5 Using Python 20Chapter 2 Input, Processing, and Output 312.1 Designing a Program 312.2 Input, Processing, and Output 352.3 Displaying Output with the print Function 362.4 Comments 392.5 Variables 402.6 Reading Input from the Keyboard 492.7 Performing Calculations 532.8 More About Data Output 65Chapter 3 Simple Functions 813.1 Introduction to Functions 813.2 Defining and Calling a Function 833.3 Designing a Program to Use Functions 893.4 Local Variables 953.5 Passing Arguments to Functions 973.6 Global Variables and Global Constants 107Chapter 4 Decision Structures and Boolean Logic 1174.1 The if Statement 1174.2 The if-else Statement 1254.3 Comparing Strings 1304.4 Nested Decision Structures and the if-elif-else Statement 1344.5 Logical Operators 1424.6 Boolean Variables 149Chapter 5 Repetition Structures 1575.1 Introduction to Repetition Structures 1575.2 The while Loop: a Condition-Controlled Loop 1585.3 The for Loop: a Count-Controlled Loop 1675.4 Calculating a Running Total 1795.5 Sentinels 1825.6 Input Validation Loops 1855.7 Nested Loops 190Chapter 6 Value-Returning Functions and Modules 2036.1 Introduction to Value-Returning Functions: Generating Random Numbers 2036.2 Writing Your Own Value-Returning Functions 2146.3 The math Module 2256.4 Storing Functions in Modules 228Chapter 7 Files and Exceptions 2397.1 Introduction to File Input and Output 2397.2 Using Loops to Process Files 2567.3 Processing Records 2637.4 Exceptions 276Chapter 8 Lists and Tuples 2958.1 Sequences 2958.2 Introduction to Lists 2958.3 List Slicing 3038.4 Finding Items in Lists with the in Operator 3068.5 List Methods and Useful Built-in Functions 3078.6 Copying Lists 3148.7 Processing Lists 3168.8 Two-Dimensional Lists 3288.9 Tuples 332Chapter 9 More About Strings 3419.1 Basic String Operations 3419.2 String Slicing 3499.3 Testing, Searching, and Manipulating Strings 353Chapter 10 Dictionaries and Sets 37110.1 Dictionaries 37110.2 Sets 39410.3 Serializing Objects 406Chapter 11 Classes and Object-Oriented Programming 42111.1 Procedural and Object-Oriented Programming 42111.2 Classes 42511.3 Working with Instances 44211.4 Techniques for Designing Classes 464Chapter 12 Inheritance 48312.1 Introduction to Inheritance 48312.2 Polymorphism 498Chapter 13 Recursion 50913.1 Introduction to Recursion 50913.2 Problem Solving with Recursion 51213.3 Examples of Recursive Algorithms 516Chapter 14 GUI Programming 52914.1 Graphical User Interfaces 52914.2 Using the tkinter Module 53114.3 Display Text with Label Widgets 53414.4 Organizing Widgets with Frames 53714.5 Button Widgets and Info Dialog Boxes 54014.6 Getting Input with the Entry Widget 54314.7 Using Labels as Output Fields 54614.8 Radio Buttons and Check Buttons 554Appendix A Installing Python 567Appendix B Introduction to IDLE 569Appendix C The ASCII Character Set 577Appendix D Answers to Checkpoints 579Index 595
Les mer

Produktdetaljer

ISBN
9780133086058
Publisert
2012-11-28
Utgave
2. utgave
Utgiver
Vendor
Pearson
Aldersnivå
05, U
Språk
Product language
Engelsk
Format
Product format
Kombinasjonsprodukt

Forfatter

Biographical note

Tony Gaddis is the author of the Starting Out withseries including Starting Out with Alice, C++, Java (TM), Visual Basic (R) 2008, Programming Logic & Design, and Python (R). Visit the Gaddis Books website for more information on Gaddis' titles. Gaddis teaches computer science courses at Haywood Community College in North Carolina. He previously taught programming for several corporations and government agencies, including NASA's Kennedy Space Center. Gaddis is a highly acclaimed instructor who was selected as the North Carolina Community College "Teacher of the Year" in 1994, and who received the Teaching Excellence award from the National Institute for Staff and Organizational Development in 1997.