instagram

Students explore CODAP, then discover how Numbers, Strings, and operations on those data types work in CODAP.

Lesson Goals

Students will be able to…​

  • Identify examples of two data types, Numbers and Strings

  • Practice writing Numbers and Strings

  • Write expressions and functions that produce values of those types

Student-facing Lesson Goals

  • Let’s familiarize ourselves with CODAP.

  • Let’s learn how to tell whether a value is a Number or a String.

Materials

Key Points For The Facilitator

  • Error messages are the computer trying to give us a clue that something is wrong. Model reacting to error messages with interest to demonstrate to students that the messages are a helpful tool.

🔗Exploring CODAP 25 minutes

Overview

Students experiment with the CODAP software platform. They explore String and Number data types, and investigate how these data types behave in CODAP.

Launch

Driver/Navigator When programming in this class, you’ll be working together using the Driver/Navigator model. Each group can only have one "Driver" - their hands are on the keyboard, and their job is to manage the typing, clicking, shortcuts, etc. If you’re not a Driver, you’re a "Navigator" - your job is to tell the Driver where to go, what to type, etc. A good Driver types only what the Navigator tells them to, and a good Navigator makes sure to give clear and precise instructions.

The Driver/Navigator Model

This model of pair programming is extremely useful for teasing apart the "thinking" step from the "typing" one. Students - especially those who are new to text-based programming or typing itself - can struggle to put their thoughts into the programming environment. This model allows them to focus on communicating their ideas, but letting the Driver focus on the coding. Likewise, the Driver has a chance to focus on syntax and programming. Finally, the requirement that ideas are translated through another person’s hands is an excellent scaffold for getting students talking about their thinking and about code.

Investigate

  • Open the Animals Starter File in CODAP.

  • Explore this data - and CODAP! - by following the instructions and recording your observations on CODAP Exploration.

  • What did you Notice? What do you Wonder?

Debrief with students. Discuss any difficulties that students encountered, for instance: the grey plus sign does not appear unless a table or table row is selected; the button that minimizes doesn’t appear unless the table’s title is selected; and, the same button that minimizes also expands.

Synthesize

  • Was there anything about CODAP was exciting to you?

  • Was there anything about CODAP that was frustrating for you?

  • Did you make any discoveries about CODAP that you think others should know about?

🔗Strings and Numbers 25 minutes

Launch

The folks at the shelter need help completing a variety of tasks using CODAP! To do this, they need to learn how CODAP handles the kinds of data in the animals data set (numbers, words, and more…​).

Investigate

Complete Strings, where you will use CODAP to make name tags for the animals at the shelter.

  • What is a string? Why might it be important to understand what a string is?

    • A string is the data type for any sequence of characters between quotation marks. It is important to understand what a string is so that we can use them correctly and interpret error messages relating to string use.

  • Did you get any error messages? What did you learn from them?

    • Most of the error messages we’ve just seen were drawing our attention to syntax errors: missing commas, un-closed strings, etc.

As an employee of the shelter, you want each of these animals to be adopted! You wonder if visitors to the shelter might prefer to receive each animal’s weight in kilograms, or maybe rounded to the nearest whole number.

  • Did anything surprise you about how numbers behave in CODAP?

  • What is an argument?

    • The arguments are the inputs to a function.

Through the activities above, you discovered two basic data types:

  • Number - a data type representing real numbers

  • String - a data type for any sequence of characters between quotation marks

During this lesson, you discovered a lot about Numbers and Strings in CODAP:

  • Numbers and Strings evaluate to themselves.

  • CODAP converts fractions into decimals automatically.

  • Anything in quotes is a String, with one exception: CODAP will convert strings containing only Numbers (e.g. “42” but not “42 hello”) into Number values.

  • Strings must have quotation marks on both sides.

  • Operators work just like they do in math - with a few exceptions. The +, for instance, will join together two strings, or a Number and a String.

  • CODAP follows the standard order of operations.

Synthesize

  • Think about the new columns you created. How did the inputs relate to the outputs?

  • What kind of error messages did you encounter, if any?

    • Error messages are a way for CODAP to explain what went wrong, and are a helpful way of finding mistakes. Emphasize how useful they can be, and why students should read those messages out loud before asking for help.

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). CCbadge Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.