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 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.