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 Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Final Exam Review Fall 2004: Concepts

def removeRed(pic,startx,starty,endx,endy,replacementcolor):
red=makeColor(255,0,0)
for x in range(startx,endx):
for y in range(starty,endy):
currentPixel=getPixel(pic,x,y)
if distance(red,getColor(currentPixel))165):
setColor(currentPixel,replacementColor)


is this right? is there another way to write it that would be shorter
farnaz
It is generally not a good idea to hard-code numbers. Why did you chose 165? 165 is a wide range. Considering that skin-tone contains a lot or red, it might be possible for the skin around the eyes to accidentally get changed. This would of course have to be tested on actual photos to be sure what the best distance range should be. Also, your indentation is wrong (aside from the fact that it shows no indentation on the page, it is still wrong the way you wrote it.) Kelly Lyons

a commercial website would store information on the databases and use programs to walk over them to gather the information and generate HTML webpages
domain name server keeps track of names (HTTP sites such as www.cnn.com) and maps them to the IP address.
IP address is a 32 bits number that address a computer
How is the ip adress formatted? What does it look like? Is it just one number? Greg Leo
How could you not hard-code numbers in this instance?

what is a client?
i found "client" on pg. 255 and it says that a client is a browser that accesses a server, so does that mean that my computer/browser would be the client to, let's say, CNN's server??



Link to this Page