Please enable JavaScript to use CodeHS

Utah Introduction to Python 1 and 2

Description

In this lesson, students will learn how to use If Statements which will allow them to use conditions to determine how their code should run. They will also learn how to use string comparison methods inside if statements.

Objective

Students will be able to:

  • Use if statements in order to tell Tracy how to make decisions
  • Use comparison string methods inside if statements
Description

In this lesson, students will learn how to expand on If Statements by including a way to have Tracy make decisions between multiple scenarios.

Objective

Students will be able to:

  • Use if/else statements in order to have Tracy make decisions between multiple scenarios
Description

In this lesson, students will learn why we may want to return values from functions and how to implement this in their own programs. They will also take a deeper dive into the in keyword and how it can be used in programs.

Objective

Students will be able to:

  • use the return keyword to return values from function back to the main program
  • use the in keyword to check if a value is contained inside another
Description

In this lesson, students will learn that while loops allow code to be executed repeatedly based on a condition. They will also be warned that infinite loops are created if the exit condition of the while loop is never met, causing the code inside the while loop to repeat continuously which causes the program to crash and will learn how the break statement can be used to avoid this.

Objective

Students will be able to:

  • Effectively use while loops in their programs
  • Identify infinite loops
  • Use the break statement inside while loops
Description

In this lesson, students review content with a 10 question End-of-Unit Quiz.

Objective

Students will be able to:

  • Prove their knowledge of the following commands and concepts through a multiple choice quiz:
    • If Statements
    • Comparison String Methods
      • isalpha
      • isdigit/isnumeric
      • isupper
      • islower
      • startswith
      • endswith
    • If/Else Statements
      • With and without elif
    • in keyword
    • Using return in functions
    • While Loops
      • With and without break