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 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.