Dictionaries

  Copy


More Options: Make a Folding Card




Storyboard Description

This storyboard does not have a description.

Storyboard Text

  • Dictionaries
  • Term
  • Dictionary
  • Maps to
  • Paper Dictionaries
  • A book or electronic resource that lists the words of a language (typically in alphabetical order) and gives their meaning, or gives the equivalent words in a different language, often also providing information about pronunciation, origin, and usage.
  • Definition
  • Key
  • "Dictionary"
  • Maps to
  • Python Dictionaries
  • "A wonderful book, full of wonders and knowledge"
  • Value
  • User Interaction
  • Input:   5
  • Here's how it works
  • Dictionary finds the key and returns the value
  • 1 2 3 4 5
  • A B C D E
  • Output:   E
  • Automatically updated output
  • Hover over pop-ups
  • Keys
  • print dict[1]
  • The Code
  • Dictionary variable
  • dict = {1:"A"            2:"B"   3:"C"   4:"D"   5:"E" }    
  • Name of dictionary variable
  • Assignment Operator
  • Curly Brackets Container
  • Value
  • Dictionary Key
  • #Returns key value #In this case would be 1
  • dict.pop(1)
  • dict[1] -> "A"   dict[2] -> "B"   dict[3] -> "C"...
  • dict.has_key(1) -> True
  • dict.keys() -> [1, 2, 3, 4, 5]
  • dict = {1:"A", 2:"B", 3:"C", 4:"D", 5:"E"} 
  • dict.values() -> ["A", "B", "C", "D", "E"]
  • Dictionary Methods
  • Removes the key and its value
  • Returns the key's value
  • Checks if dictionary contains the key specified
  • Returns a list of keys
  • Returns a list of values
  • Hover over pop-ups
Explore Our Articles and Examples

Try Our Other Websites!

Photos for Class – Search for School-Safe, Creative Commons Photos (It Even Cites for You!)
Quick Rubric – Easily Make and Share Great-Looking Rubrics
abcBABYart – Create Custom Nursery Art