Python Activity 1 - Variables and Input

This lesson guides the students through creating variables, obtaining data from users and changing data types. An activity worksheet is provided. Questions on the worksheet check for understanding as the students work through the problems. The students culminate the activity with a simple calculator project at the end.

National Standards Alignment

csta 2-AP-10 2-AP-11 2-AP-12 2-AP-17 2-CS-01 2-CS-02 2-CS-03 2-DA-07 2-NI-06
iste ISTE-1c ISTE-1d ISTE-2a ISTE-2b ISTE-3a ISTE-3b ISTE-4a ISTE-4b ISTE-4c ISTE-4d ISTE-5a ISTE-5b ISTE-6a ISTE-6b ISTE-7a ISTE-7b

OVERVIEW

Activity Overview:

This lesson guides the students through creating variables, obtaining data from users and changing data types. An activity worksheet is provided. Questions on the worksheet check for understanding as the students work through the problems. The students culminate the activity with a simple calculator project at the end.

Meta description

  • Subject Area: Computer Science
  • Grade Level : 6-8
  • Computer Science Domains:
    • Computing Systems
    • Algorithms and Programming
  • Computer Science Principles:
    • Fostering an Inclusive Computing Culture
    • Collaborating Around Computing
    • Recognizing and Defining Computational Problems
    • Developing and Using Abstractions
    • Creating Computational Artifacts
    • Testing and Refining Computational Artifacts
    • Communicating About Computing
  • Materials:
  • Considerations:
    • An intermediate knowledge of the Python programming language will help to assist students with project completion.

Lesson Plan

Overview

This lesson guides the students through creating variables, obtaining data from users and changing data types. An activity worksheet is provided. Questions on the worksheet check for understanding as the students work through the problems. The students culminate the activity with a simple calculator project at the end.

ASSESSMENT PRE/POST-TEST

NA. This activity is project based.

OBJECTIVES

Use variables, the input function and data types to create a simple calculator program.

CATCH/HOOK

What is your favorite app? Have you ever thought about how it works?

ACTIVITY INSTRUCTIONS

Introduce the students to Google Colab. Once everyone is logged in give a brief demonstration on how to modify and create new code cells. Make sure the students can also modify and create text cells. Once everyone is capable of using the development environment, hand out the attached work sheet. Encourage the students to answer all the questions as they go through the problems. Be available to answer questions along the way and assist if anyone gets stuck on the final project at the end.

Supplements

Any items in this section are the property & under the license of their respective owners.

REVIEW

Before the end of class, conduct a presentation of different calculator programs. Review the functionality and code of each and highlight the differences. The problem is supposed to be open ended so students may come up with different solutions to different aspects of the problem. It would also be a good time to address user interface and usability.

STANDARDS

TypeListing
CS DomainsComputing Systems, Algorithms and Programming
CS PrinciplesFostering an Inclusive Computing Culture, Collaborating Around Computing, Recognizing and Defining Computational Problems, Developing and Using Abstractions, Creating Computational Artifacts, Testing and Refining Computational Artifacts, Communicating About Computing