3 Python program structure

Image

What you will learn

In this chapter, you’ll build your first Python program. You’ll discover that a Python program is just a sequence of statements obeyed in order by a computer. You’ll create and save Python program files for later use. You’ll also discover how to add new capabilities to Python programs by importing and using helpful resources, including our first snaps functions that you can use to create impressive programs.

Write your first Python program

Use Python libraries

Python comments

Run Python from the desktop

Adding some snaps

What you have learned

Write your first Python program

So far, we’ve used the ...

Get Begin to Code with Python now with O’Reilly online learning.

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