Popular in Course
Popular in Department
This 2 page One Day of Notes was uploaded by Notetaker Notetaker on Monday January 26, 2015. The One Day of Notes belongs to a course at University of Washington taught by a professor in Fall. Since its upload, it has received 24 views.
Reviews for CS 1
Better than the professor's notes. I could actually understand what the heck was going on. Will be back for help in this class.
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 01/26/15
CS 120 121123 Notes Testing and Repetition Rule Assignment always moves information from right to left 0 Rule Always evaluate compute the right side then assign the result to the name on the left side 0 Facts about expressions 0 Expressions are formulas using ampamp ltlt gtgt o Operators can only be used with certain data types and their result is a certain data type 0 Putting in parentheses is OK and it s smart Facts 0 Expressions are formulas ab pointswgt year4o 74 0 Need and give data types ltltgtgt want numbers ampamp want logical Boolean values and want operands to be same types 0 Parentheses are good ab0c is the same as abc but is easier to read 0 Mod is what s left after divide o Ab read quota mod bquot is the amount left after quotb divides into a evenlyquot 0 3 is 0 1 3 is 1 Repetition o Preating commands is a powerful way to use a computer we could repeat them but all programming system have a way to loop Lightbot 20 used recursion a function calling itself Symbolic Lightbot pre xed a number 0 Processing and other modern languages use a for loop count 01234 For int j0 jlt10 jj1 Stuff to be repeated Tests 0 The instructions of a program are exectured sequentially one after another somethimes we want to skip some say hello to the if o If also has a required form lf year4 0 Stuff to test else stuff if condition is false 123 HAPPY BIRTHDAY TO ME Notes 0 Plans 0 O O O 0 Mouse input Keyinput Text input The Story of a Mouse mouseX and mouseY give the coordinates of the mouse on the canvas Also mouseReleased that res when the mouse is released after being pressed Control looping with the mouse Fonts Try to pick common fonts Click to load font into the data directory PFont typeface1
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'