What is a Python Script?
• A Python script is multiple lines of code stored in a file, also called a module
- Modules help keep your code organized!
- You can have similar or related code all in a single file
• Python scripts have conventions
- Some allow your code to execute correctly
- Others help to keep your code readable
• Basic conventions
- Put every statement on a line by itself
- Use spaces around operators
- Use spaces after commas, colons, and semicolons
• As you learn more commands, you will learn more conventions!
Property of Penn Engineering |