In this lesson, you’ll learn how to make the most basic python program, one that displays texts on the screen. When you run these programs, you’ll see text appear on the console screen. You will learn how to print in python using the print statement. You will also learn how to use quotations, apostrophes, and strings.
Students learn how to print text in Python.
In this video, students will learn about a fundamental aspect of every programming language: Variables. A variable is something that stores information in a program that you can use later. More specifically, a variable has 3 things: a name, type, and value. One of the variables students will be presented is Greeting
.
SWBAT define Python variables and types.
In this lesson, we cover user input. We learn how to request user input as both strings and integers, we learn where the input is stored, and we learn how to convert strings and integers. By converting strings to integers, students can incorporate their knowledge from the previous lesson (Mathematical Operators) with this lesson on user input.
SWBAT incorporate user input into their programs.
In this lesson, students will learn about using mathematical operators in their Python programs. They will work through multiple examples to get comfortable with operator precedence and using different types of operators.
Students will be able to:
In this lesson, students will be able to perform string operations in order to concatenate values together.
Students will be able to:
In this lesson we will discuss what is a Boolean and go over examples.
Students learn about booleans and how they might be useful in their programs.
In this lesson we will learn how to use If and If-Else Statements; these statements allow you to use conditions to determine how your code should run.
Students learn how to use if statements for control flow in their programs.
In this lesson, students will dive into comparison operators. Comparison operators give the ability to compare two values. Using comparison operators in programming is similar to math in that less than <, greater than >, less than or equal to <=, and greater than or equal to >= are the same. The differences are that operators for equal to are == and not equal are !=. Using comparison operators allow programs to make decisions.
Students will be able to:
In this lesson, students will look at logical operators. Logical operators give the ability to connect or modify Boolean expressions. Three logical operators are NOT
(!), or
and and
. These logical operators can be used in combination. With these logical operators, logical statements can be constructed, such as “I go to sleep when I am tired OR it’s after 9pm”, “I wear flip flops when I am outside AND it is NOT raining”.
Students will be able to:
or
, and
, and NOT
(!) Students learn how to effectively use while loops in their programs and to watch out for infinite loops.
In this lesson, students will explore how to use for loops in their Python programs. They will be reminded how to use i
as a variable in their programs as well as how to control the values of i
by altering the starting, ending, and interval values.
Students will be able to:
i
as a counteri
in a for loopIn this lesson, students learn about break and continue statements. A break
statement is used to immediately terminates a loop. A continue
statement is used to skip out of future commands inside a loop and return back to the top of the loop. These statements can be used with for or while loops.
Students will be able to:
for
loop within a for
loop, we need to be careful to create a second variable to index on. Students build upon their control structures knowledge to start using nested control structures in their programs.
In this lesson, we learn about Functions. Functions let us break our program into different parts that we can organize and reuse however we like. Functions are the main building block of complex Python programs.
Students will be able to:
In this lesson, we dive deeper into the concept of functions by exploring how to use parameters.
Students will be able to:
In this lesson, we explore where variables exist and what the difference is between a local and global variable.
Students will be able to:
In this lesson, students explore functions with return values and deepen their understanding of and ability to use functions.
Students will be able to:
In this lesson, students explore Python’s way of handling errors with exceptions.
Students will be able to: