COMP 1005 Study Guide - Midterm Guide: Global Variable, Rgba Color Space, Ellipse

171 views13 pages

Document Summary

Thursday 2;30 3"30 random() gives a random number use width and height for rect spiral. Everything has a type: int (integers) float (decimals) boolean (true/false) char (single character) other data types : colors(rgb,rgba,gray scale) string (word, sentence: pimage (graphics) Casting: casting converts a data type into another. != not equal to: < less than, > greater than, <= less or equal to, >= greater or equal to, && and. Starry night size(600,300); ellipse(300,150,590,290); strokeweight(10); int a=300; int b=150; point(a,b); int x; while ((a<600||a>0)||(b<300||b>0)){ x=(int) random(5); if (x==1) { a+=10; January 24th 2013 if statements if (sky is blue) print hurray! if(sky is not blue) print booo . January 29th 2013 type void= returns nothing setup () in brackets are the inputs. February 12 2013 for(initialization, condition, increment) { for(initialization,condition,increment){ let"s say we have an integer as an input, the output will be: true if (n=a^2+b^2) false (otherwise) in code:

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