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
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:
- Website, https://colab.research.google.com/
- 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
| Type | Listing |
|---|---|
| CS Domains | Computing Systems, Algorithms and Programming |
| CS 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 |