2: Parts of Python
Expectations
We're going to take a tour of Python. You are expected to know generally what these things are, you're not yet expected to know how to use them. So no freaking out. We'll play around with some fun projects after a quick look around.
Learning Targets
I can make a hello world app in Python.
I can differentiate between compile-time, run-time, and logic errors.
I can describe the basic constructs of programming languages such as variables, conditionals, loops, and flow control.
Assessments
You will be answering comprehension questions about the layers supporting software execution.
You will be creating and submitting your several small Python apps using trinket.io
Let's go to trinket.io and build some simple stuff, starting with print("Hello, world")
We'll go over each of these concepts in greater detail. For now, let's skim over all the big topics.
Class Videos
The first video deals with the following concepts: Functions, Variables, Operators and Conditionals
Class 1/4
Class 1/11
Class 1 / 20: User defined functions
class 1/24: for / while loops
Key Concepts
Data Types
The first thing we'll tinker with is declaring variables and storing information. Variables in Python are dynamically typed, meaning you can store one type of information in a variable and then switch it without any fuss. Other languages are more strict and don't allow such shenanigans.
Operators
We use math symbols for most common operations. But Python has some cool operators. Read!
Conditionals
Conditionals control how the program flows based on input from the user (in an app) or sensors (on a robot.
Last updated