A statement tells the computer to do something, and a scope contains one or more statements! You can think of a statement as a sentence, and a scope as a paragraph.
A scope in Python begins with a colon (:), and scopes are defined by indentation. All statements in a scope must start at the same indentation level in order to remain in the same scope!
The code below shows an example of what a scope looks like and how a local scope is started and ended for the greet() function. Take a look at the code and make sure to read the comments to understand which lines are in the local scope of the function.
(Don't worry if you don't understand what the code is doing - we will learn about functions very soon!)
This video helps frame how we can think about statements and scopes as rooms in a house & provides an example of how scopes affect our code!
This video helps to further explain how indentation impacts our scopes. Again, you do NOT need to understand what the code in this video is doing! Just focus on how what is said about indentation - you will learn the rest soon :)