7 TUTORIAL FOR PYTHON BEGINNERS

OBJECTIVES

Learn how to use the Interpreter Prompt.

Introduce basic types like numbers, strings, booleans and lists.

Explain basic arithmetical operators, assignment and comparisons.

Show how to add comments to code.

Explain how Python uses indentation to denote structure.

Demonstrate what a function is, at a basic level.

INTRODUCING PYTHON

This section covers the basic Python knowledge required to understand the examples used throughout Part II of this book. If you are already familiar with Python, feel free to skip over to the next chapter.

We assume you are using Python 3 in this chapter.

In ...

Get Computational Thinking - A beginner's guide to problem-solving and programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.