Teach Python from the fundamentals to the details Written in clear, easy-to-understand language, and rich with example programs that are concise, practical, and real-world oriented. The material is written specifically for beginner students and thoroughly explains important concepts. Teaches Python in a step-by-step fashion. Each chapter covers a major set of topics and builds knowledge as the student progresses through the book. Although the chapters can be easily taught in their existing sequence, flexibility is also provided. The Turtle Graphics library, which is a standard part of Python, is a fun and motivating way to introduce programming concepts to students who have never written code before. Turtle Graphics sections are designed with flexibility in mind and can be assigned as optional material, incorporated into your existing syllabus, or skipped. UPDATED - Two commands for reading user input with dialog boxes have been introduced: Turtle.
numinput and Turtle.textinput. NEW - A new chapter on database programming, Chapter 14, introduces SQL and Python database programming with SQLite. NEW - Comprehension expressions, such as list comprehensions, dictionary comprehensions, and set comprehensions, are introduced and explained in this edition. UPDATED - Several new string topics include: The use of f-strings throughout the text, which were introduced in Python 3.6, to display formatted output. F-strings use a concise and intuitive syntax and are easier to learn than the format function. The previous material on the format function has been moved to Appendix F.
A new discussion of string tokens in Chapter 8. A new example of reading and parsing CSV files in Chapter 8. An expanded discussion of string concatenation in Chapter 2 to include implicit concatenation of adjacent strings. UPDATED - Several new GUI programming topics in Chapter 13 include: Adding borders to widgets Internal and external padding Listbox widgets and scrollbars NEW - The random.choice() function is introduced in Chapter 7 as a way to randomly select list elements. NEW - New function topics in Chapter 5 include: The pass keyword An expanded discussion of the value None, and why a function might return None The standard practice of conditionally executing the main function Features for studentsuccess Example Programs are designed to highlight the topic currently being studied. Source code for these programs is provided so that students can run the programs themselves. Program Output is a sample of its screen output shown after each example program.
This immediately shows the student how the program should function. Concept Statements, Checkpoints, Notes, Tips, and Warnings throughout the book all call out important pieces of information for the student. In the Spotlight sections provide a programming problem and a detailed, step-by-step analysis showing the student how to solve it. A thorough and diverse set of review questions, such as Multiple Choice and Short Answer, check the student's mastery of the basic material presented in each chapter. These are followed by Algorithm Workbench exercises that require problem solving, analysis, and output prediction. Programming Exercises are designed to solidify the student's knowledge of the topics currently being studied. Each chapter offers a pool of programming exercises. In most cases, the assignments present real-world problems to be solved.