Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 2.23 KB

File metadata and controls

44 lines (33 loc) · 2.23 KB
layout page
title Codelab / Chapter 02
tags codelab

Introduction to Data

[Back to Codelab index]

Hazel!

Lesson

Lesson document

  1. What is data?
  2. How to data
  3. Data structures

New Terms

  • Analog: Relating to continuous numerical values of infitesimal granularity
  • Binary: Base-2 numeral system, consisting only of 0 and 1. Counting up from 0, the binary numbers are: 0, 1, 10, 11, 100, 101, 110, 111, 1000...
  • Boolean: A data type that has two possible values: True and False. These are often used with and associated with the binary values 1 and 0. Boolean values in Python are often used in conditionals and loops (which we'll talk about in the future)
  • Digital: Relating to discrete numerical systems
  • Floating Point Number (Float): A number with a decimal point (e.g. 3.0 rather than 3). Because computers use binary numbers internally to represent numbers with decimal points, we often run into very small and unexpected rounding errors when using floats.
  • Integer: A positive, negative, or zero whole number (e.g. 3 rather than 3.0).
  • String: Text data. We can think of it as a list of this as a list of characters. For example, "Hazel"[2] is 'z'.

Resources


Homework

Do:

  1. Let's flex our algorithmic thinking muscles some more. Write out, in plain English, an algorithm to sort a deck of cards.

  2. And: write out, in plain English, an algorithm for a cashier to find exact change.

Read: