python review
DESCRIPTION
Iteration Start Stop Increment Number for x in sequence: print x Start: x = sequence[0] Stop: x = sequence[len(sequence) – 1] Increment: values in sequence Number: len(sequence)TRANSCRIPT
![Page 1: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/1.jpg)
Python Review
![Page 2: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/2.jpg)
IterationStartStopIncrementNumber for x in sequence:
print x
Start: x = sequence[0]Stop: x = sequence[len(sequence) – 1]Increment: values in sequenceNumber: len(sequence)
![Page 3: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/3.jpg)
IterationStartStopIncrementNumber for x in range(10):
print x
Start: x = 0Stop: x = 9Increment: 1Number: 10
![Page 4: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/4.jpg)
IterationStartStopIncrementNumber
for x in range(0, 12, 2): print x
Start: x = 0Stop: x = 10Increment: 2Number: 6
range(0, 12, 2) [0, 2, 4, 6, 8, 10]
![Page 5: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/5.jpg)
IterationStartStopIncrementNumber
x = 0while x <= 10: print x x = x + 2
Start: x = 0Stop: x > 10Increment: 2Number: 6
![Page 6: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/6.jpg)
Iteration
x = 0while x <= 10: print x x = x + 2
x = 0while x <= 10: print x
x = 0while x <= 10: x = x + 2 print x
while x <= 10: x = 0 print x x = x + 2
Go Forever
2 4 6 8 10 12
All Zeros
![Page 7: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/7.jpg)
Color in Visualization
CMSC 120: Visualizing InformationLecture 4/24/08
![Page 8: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/8.jpg)
3 or more dimensions hard to visualize
Projection into lower-d space distorts data
Multifunctioning Graphical Elements
Multivariate Visualization
![Page 9: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/9.jpg)
ColorPre-attentive
1000s of different colors20-30 gray tonesPatterns, boundaries, movement
![Page 10: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/10.jpg)
Color PurposesEmphasisAppealDimensionality
Hello, here is some text. Can you read what it says?Hello, here is some text. Can you read what it says?Hello, here is some text. Can you read what it says?Hello, here is some text. Can you read what it says?Hello, here is some text. Can you read what it says?Hello, here is some text. Can you read what it says?
Shape of Nautilus Shell
Diameter in mm185 190 195 200 205 210 215 220
Wid
th in
mm
86
88
90
92
94
96
98
100
102
104
106FemaleMale
![Page 11: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/11.jpg)
![Page 12: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/12.jpg)
Color
![Page 13: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/13.jpg)
ColorThe quality of an object with respect to the light
reflected by the object
Determined visually by:• Hue: color• Saturation: purity• Brightness: % black
![Page 14: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/14.jpg)
Color
![Page 15: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/15.jpg)
Types of ColorsAdditive Colors
All visible colors are a sum of two or more
Primary ColorsRed, Green, Blue
SubtractiveComplementary ColorsRemoving an additive
color from white light
![Page 16: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/16.jpg)
Representing ColorEncoding
RGBCMKY = 1 - RGB
![Page 17: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/17.jpg)
Choosing the Right ColorHuman matches 16-20 colors
Addition of pattern elements
< 10 -12
> 20 can no longer be pre-attentively processed
VGA Monitor16 colors262,144 (643)
Super VGA256 colorsSeveral million
How much and which colors?
![Page 18: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/18.jpg)
Color Schemes
![Page 19: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/19.jpg)
Color SchemesColor may carry standardized meanings in
particular applications.
blue = water bodiesgreen = vegetationbrown = desert/mountainswhite = ice or snow, etc.
Color maps
![Page 20: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/20.jpg)
2004 Election
![Page 22: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/22.jpg)
Elevational map of KansasSimilar colors: subclassesDissimilar: barriers/unrelated
![Page 23: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/23.jpg)
Complementary ColorsOpposites on the color
wheel
High ContrastVibrant (full saturation)Can be jarring
Make something stand out
Bad for text
![Page 24: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/24.jpg)
Analogous ColorsAdjacent on Color Wheel
SereneComfortableFound in NaturePleasing
Contrast can be problematic
Use black, white, gray as an accent
![Page 25: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/25.jpg)
Analogous ColorsAdjacent on Color Wheel
SereneComfortableFound in NaturePleasing
Contrast can be problematic
Use black, white, gray as an accent
![Page 26: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/26.jpg)
Triadic ColorsEvenly spaced
Vibrant, even when pale hues are used
Balance color useOne dominateOthers accent
![Page 27: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/27.jpg)
Warm and CoolColorsCool colors
Short wave lengthviolet, blue, cyan, green large regionsfeatures for which no special
emphasis is desired
Hot colorsLong wavelengthyellow, orange, red, magenta
(long wavelength). Best used for small regions features for which special
emphasis is desired
![Page 28: Python Review](https://reader035.vdocuments.us/reader035/viewer/2022081422/5a4d1b3e7f8b9ab05999f8de/html5/thumbnails/28.jpg)
Hot and Cool ColorsColor Stereoscopic Effect
cool colors appear farther awayhot colors appear closer. enhanced by using black boundaries between color
areas, a small contour interval, and bright high-saturation or fluorescent