Skip Top Navigation Bar

Arithmetic Expressions and Assignments

Overview

In this lesson, students will write and interpret arithmetic expressions.

Learning Objectives

Skills

Student Outcomes

Students will be able to:

Duration: 1 class period

Resources

Warm-up / Motivate

Have students experiment with arithmetic operators by completing the practice: Practice: Experiment with Arithmetic Basics

Learn

Either as a group or on their own, have students review tutorial: Learn: Arithmetic Expressions and Assignments

Debrief: If students complete the tutorial independently, be sure to answer any questions students might have.

Highlighters can be used to highlight each step in the evaluation process.

Practice

Have students ask their favorite AI to generate some practice expressions to evaluate. Here's a sample prompt you might use: "To use with people just starting out in learning Java arithmetic expressions, generate a set of 10 expressions in Java that use the arithmetic operators."

Wrap-up / Extension

Create several sets of operation and number cards on index cards. Each set should include the following:

Have students randomly create 10 expressions by pulling cards out of the set. It is adivisable to keep the number cards and operation cards separate. Students should write their expressions on a piece of paper.

Provide students with requirements for the length of the expressions in terms of the number of operations that are required. For example, maybe the first 2 have 1 operation, the next 2 have 2 operations, the next 3 have 3 operations, and the last 3 have parenthesis.

After students evaluate these expressions, they can use the Java Playground to check if their answers are correct.

Next Lesson

Lesson Plan: Introduction to Type Conversions with Casting