CSCI 1301 Study Guide - Midterm Guide: Decimal Mark, American Broadcasting Company

99 views2 pages

Document Summary

When dividing two integers, the result is a rounded-down version of the division (ex. 5 / 2 = 2 ) A number with digits after the decimal point. One list can contain elements of different data types. A string is really just a list of characters. Can be indexed into (ex. list=[ hello , 3] list[0] == hello ) An object that represents a picture, consisting of pixels. Need to use makepicture to tell the computer that this is a picture. Each pixel knows which picture it belongs to. Pixel attributes include r value, g value, b value, x location and y location. A color is comprised of three color channels, which are stored as integers. Selected picture functions makepicture(string) makeemptypicture(width, height) makeemptypicture(width, height, color) getheight(picture) getwidth(picture) getpixel(picture, x, y) getpixelat(picture, x, y) getpixels(picture) getcolor(pixel) setcolor(pixel, color) distance(color1, color2) makecolor(red, green, blue) getx(pixel) gety(pixel) getred(pixel) getgreen(pixel) getblue(pixel) setred(pixel, value) setgreen(pixel, value) setblue(pixel, value)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents