Please enable JavaScript to use CodeHS

Utah Introduction to Python 1

Description

In this lesson, students will learn about a fundamental aspect of every programming language: Variables. A variable is something that stores information in a program that can be used later.

Objective

Students will be able to:

  • Describe what variables are
  • Discuss why variables are used in our programs
Description

In this lesson, students learn about 4 different data types and what kind of information they hold. They also learn how to use the type function to determine the data type of a value and use casting to switch values between different data types.

Objective

Students will be able to:

  • Categorize values into different data types (string, integer, floating point number, and boolean)
  • Use the type function to check the type of any value
  • Use str, int, and float to cast values to different data types
Description

In this lesson, students will dive deeper into the Strings data type, learning how to concatenate strings and use escape sequences.

Objective

Students will be able to:

  • concatenate strings together to form more complex messages
  • use escape sequences to:
    • split commands onto multiple lines
    • print quotation marks inside strings
    • add new lines to strings
Description

In this lesson, students will learn how to call methods on values and use three different string methods (upper, lower, and capitalize) to alter text.

Objective

Students will be able to:

  • Call methods on values
  • Use the following string methods to alter text
    • upper
    • lower
    • capitalize
Description

In this lesson, students will learn how to incorporate user input into their programs. Students will learn how to request user input as both strings and integers, store the input in a variable, and how format can be used to create messages.

Objective

Students will be able to:

  • Incorporate user input into their code in order to customize their programs
  • Use format to edit string messages
Description

In this lesson, students will dive deeper into the concept of functions by exploring how to use parameters to customize their code.

Objective

Students will be able to:

  • Incorporate parameters into their functions in order to adapt their functions to multiple situations
Description

In this lesson, students will dive into common errors they may run into while developing Tracy programs and learn some techniques for debugging their programs.

Objective

Students will be able to:

  • Debug common errors in code
Description

In this lesson, students will learn how to allow the user to interact with their programs using their mouse. They will learn how to allow interaction when the user clicks on Tracy or anywhere on the canvas as well as how to effectively use variables inside clickable programs.

Objective

Students will be able to:

  • use the onclick function inside their programs
  • use the getscreen function to allow the user to click anywhere on the canvas to trigger an event
  • use and manipulate variables inside programs that use the onclick function
Description

In this lesson, students will expand their knowledge of for loops. They are aware that for loops execute the same lines of code a given number of times but, in this lesson, will learn that i is actually a variable that can be used to control commands inside the loop as it is running.

Objective

Students will be able to:

  • Use i as a variable inside their for loop to control different commands
Description

In this lesson, students will learn the extended parameters that can be used to control the value of i in for loops. They will then be able to use the variable i to control much more of their code by setting specific values.

Objective

Students will be able to:

  • Control the value of i using extended parameters
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:
    • assigning and using variables
    • Data types (string, integer, floating point number, boolean)
    • type
    • print
    • int / str / float
    • Concatenation
    • Escape sequences
    • String methods
      • capitalize
      • upper
      • lower
    • input
    • clickable interaction using onclick