Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Final Exam Review Fall 2004: Data Structures

array - a sequence of bytes right next to one another in memory
matrix - a 2-dimensional array
tree - directory tree - contains roots and branches (shows files on computer)
list - structured text, sequences
hash table - allow us to relate keys and values, like databases, but only in memory
What are the examples from JES that use each? Kelly Lyons
JES examples:
array: print [1,2,3,4]
matrix: makePicture(pickAFile())
tree:
file = pickAFile()
print file
list: mylist = ["This", "is", "a", "list"]
hash table:
row = 'student name': 'Katie', 'student ID':'S1'
print row
When writing these examples, think about whether pictures or sounds contain array or matix values, and then what elements of a picture or sound are orgainzed in a matrix or array. Summer McWilliams
I cannot figure out how to type in a Hash table, whenever i enter the above code it gives me the error "Your code contains at least one syntax error, meaning it is not legal jython."
Check out pages 281 and 282 in the book for a good sample of hash tables. You may want to think of hash tables as being similar to databases in that they "associate" keys (names) to values. Greg Leo
ok, so i know that the sample values of sounds will print out as an array, but what sound function will print each of these samples (within a for loop). I tried

for index in range(1, getLength(sound)):
print getSample(index)

and a few other things like that but I either was given the length of the total sound or was given an error message


for an array example is it ok to do this:
>>>sound = makeSound(pickAFile())
go to media tool -> sound tool -> sound and scroll across the graphed sound, the sample value at each sample will appear and that is an array of sound values


for hash tables, when it says "like databases, only in memory," what does the "only in memory " part mean?




i'm typing in exactly what is written at the top of page 282 and i get an error message about a syntax error...i'm glad this book helps me so much



Link to this Page