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

Fall 2006 Midterm 1 Review: 20 Questions

Questions?


is number 2 a trick, or is the answer nothing, until you define a function for someFunction?
Right the function is not defined. What happens when you call a function that is not defined? -Albert d'Heurle

is brightness how much white is in a picture?

You get an error... is that it?

This doesn't make sense....AHHHH!

Luminance is intensity, is perceived amount and objectively measured while brightness is subjective and is just perceived and not measureable....
Stacy Schwaiger

For a function to "take in" a value, it is running the function with that value passed into it? is this correct? Im not sure how to word this answer accurately.

? numbers are numeric values (23,34,95, getRed, distance..etc.)?
? strings are things life for loops, a repetitive sequence ?
? lists are things like a range or a set of returned pixels.?
? objects are information that jes recognizes as a specific thing like a picture, or the color "black", or "red"?

???• 42 NUMBER
• "yo, sup?" OBJECT
• "100" OBJECT
• a pixel OBJECT
• a color OBJECT
• a list of pixels LIST
• the returned value of pickAFile() STRING
• the returned value of range(1, 100) LIST
• the returned value of distance(red, blue) NUMBER
• the returned value of makePicture(pickAFile()) OBJECT
• the returned value of setRed(pixel, 50) NUMBER
???

  1. 18 is not clear to me. is it basically true that return runs the function and saves the returned value for later use in another function or as a stored instance and print merely displays the function’s output on the screen and is not meant for use later?
Yes, print just displays a value (any value that you tell it to print, not necessarily the function's output) in the command area. Return doesn't really "save" the value for future use, though unless the caller saves it in a variable — e.g.
usefulValue=function(inputs)
It's the "usefulValue=" bit that does the saving of the value for later use, not the return inside the function. The return makes the value available – for saving, printing, giving to another function as an input, printing, or whatever. Colin Potts

I'm a little confused by the wording in the first part of #7, is it asking for the amount of memory required to represent the color of one pixel (24 bits) or one color component (8 bits) or something totally different?
Clearly you are on your way to law school! (But you're right; it is a bit unclear.) We are asking about the color for each pixel, so take the rest of the question from there. Colin Potts



Link to this Page