Learn Programming
Ana Bell
  • MEAP began October 2016
  • Publication in Spring 2017 (estimated)
  • ISBN 9781617293788
  • 400 pages (estimated)
  • printed in black & white

When you're ready to learn to program, Python is a great language to start with. It has a straightforward syntax, you'll find it easy to learn, and it's extremely versatile. Once you master the basics, you'll appreciate Python's very strong online community where you can continue learning and tinkering with more advanced programming techniques. All you need is some help to get going. Learning to program with Python doesn't have to be difficult, in fact it can even be fun. This book will get you started!

Learn Programming is an introduction to programming using one of the most popular programming languages. The first few chapters give you a quick background to programming concepts and a hands-on guide to setting up your programming environment. You will then be gently introduced to the basics of programming, building up to writing your first programs! This easy-to-follow tutorial is full of exercises to practice and reinforce each new concept, as well as to give you confidence that you are ready to move on to the next lesson. As you progress, you'll learn programming topics and concepts that are ubiquitous across almost all other programming languages. By the end of the book, you'll have a solid grasp of how to write programs as well as programming best practices.

Table of Contents detailed table of contents

Unit 0 Python and Your Programming Environment

1. Lesson 1 Why Should You Learn Python?

1.1. Introducing Python

1.2. Why you should care about Python

1.2.1. A general purpose language

1.2.2. Writing in Python is intuitive

1.2.3. Challenges in Using Python

1.3. Where you are now and where you will be

1.4. Our plan for learning Python

1.4.1. First Steps

1.4.2. Practice, practice, practice, practice

1.4.3. Thinking like a programmer

1.5. Summary

2. Lesson 2 Understanding your Programming Environment

2.1. Different Python Versions

2.1.1. Python Version 3.5

2.1.2. Downloading Python Version 3.5

2.1.3. Anaconda Python Distribution

2.1.4. Integrated Development Environments

2.2. Setting up your Workspace

2.2.1. The IPython Console

2.2.2. The File Editor

2.3. Summary

Unit 1 Programming Overview, Objects, and Statements

3. Lesson 3 Basic Principles of Learning a Programming Language

3.1. Programming as a Skill

3.2. A Parallel with Baking

3.2.1. Understand the Task "bake a loaf of bread"

3.2.2. The Recipe

3.2.3. Visualizing the Recipe with Flowcharts

3.2.4. Use an Existing Recipe or Make One Up?

3.3. Think, Code, Test, Debug, Repeat

3.3.1. Understanding the Task

3.3.2. Visualizing the Task

3.3.3. Writing Pseudocode

3.4. Writing Readable Code

3.4.1. Using Descriptive and Meaningful Names

3.4.2. Commenting Your Code

3.5. Summary

4. Lesson 4 Python Variables and Expressions

4.1. Giving Names to Things

4.1.1. Math versus Programming

4.1.2. What the Computer Can and Cannot Do

4.2. Introducing Python Variables

4.2.1. Objects are Things that can be Manipulated

4.2.2. Objects have Names

4.2.3. What Object Names are Allowed?

4.2.4. Creating a Variable

4.2.5. Updating a Variable

4.3. Summary

5. Lesson 5 Object Types and Python Statements

5.1. Types of Things

5.2. Basic Type of Objects in Programming

5.2.1. Integers as Whole Numbers

5.2.2. Floating Point as Decimal Numbers

5.2.3. Booleans as True/False Data

5.2.4. Strings as Sequences of Characters

5.2.5. NoneType as the Absence of a Type

5.3. Working with Basic Types of Data Values

5.3.1. Building Blocks of Expressions

5.3.2. Converting Between Different Types

5.3.3. How Arithmetic Impacts Object Types

5.4. Summary

6. Lesson 6 CAPSTONE PROJECT: Your First Python Program

6.1. What You Know so Far

6.2. Your First Programming Task: Convert Minutes to Hours

6.2.1. Think-Code-Test-Debug

6.2.2. Divide your Task

6.2.3. Implement the Conversion Formula

6.3. Your First Python Program: One Solution

6.4. Your First Python Program: Another Solution

6.5. Checkpoint Exercises

6.6. Summary

Unit 2

7. Lesson 7 String Objects

8. Lesson 8 Simple Error Messages and Tuple Objects

9. Lesson 9 Interacting with the User

10. Lesson 10 CAPSTONE PROJECT: Name Mashup

Unit 3

11. Lesson 11 Introducing Control Flow in Programs

12. Lesson 12 Making More Complicated Decisions

13. Lesson 13 CAPSTONE PROJECT: Choose Your Own Adventure

Unit 4

14. Lesson 14 Repeating Tasks with Loops

15. Lesson 15 Customizing Loops

16. Lesson 16 Repeating Tasks while Conditions Hold

17. Lesson 17 CAPSTONE PROJECT: Escape the Maze

Unit 5

18. Lesson 18 Building Programs to Last

19. Lesson 19 Achieving Modularity and Abstraction with Functions

20. Lesson 20 Advanced Operations with Functions

21. Lesson 21 CAPSTONE PROJECT: Analyze Your Friends

Unit 6

22. Lesson 22 Introducing Collections of Data

23. Lesson 23 Python Lists

24. Lesson 24 Python Dictionaries

25. Lesson 25 Aliasing an Object

26. Lesson 26 CAPSTONE PROJECT: Plagiarism Detector

Unit 7

27. Lesson 27 Introducing Python Objects and Classes

28. Lesson 28 Working with Classes

29. Lesson 29 Object Oriented Programming

30. Lesson 30 CAPSTONE PROJECT: The Solar System

Unit 8

31. Lesson 31 Debugging

32. Lesson 32 Useful Libraries

33. Lesson 33 File Input and Output

34. Lesson 34 What is a GUI

35. Lesson 35 CAPSTONE PROJECT: Traffic Simulator

36. Lesson 36 What's Next?

37. Lesson 37 CAPSTONE PROJECT: Movie Picker

Appendixes

Appendix A: Python Cheat Sheet

Appendix B: Interesting Python Packages

What's inside

  • Learn programming fundamentals for any language
  • Python programming language basics like functions, classes, and file input/output
  • Writing data-centric and mathematical programs
  • Creating programs with graphical user interfaces
  • Programming best practices

About the reader

No programming experience needed.

About the author

Ana Bell is a lecturer at MIT in the Electrical Engineering and Computer Science department, where she co-lectures the Introduction to Computer Science and Programming Using Python course aimed at students with no programming experience.


Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
Buy
  • MEAP combo $34.99 pBook + eBook
  • MEAP eBook $27.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks