320 likes | 398 Views
Exam 2 Review Game. CSC 111. Individual Round. 1. What does the code do? x = x + dx; y = y + dy ;. 2. What does the code do? dx = dx * -1;. 3. What does the code do? dy = dy + 1;. 4. What does the code do? int [] numbers = new int [5];. 5. Suppose numbers is [10, 20, 30]
E N D
Exam 2 Review Game CSC 111
1. • What does the code do? x = x + dx; y = y + dy;
2. What does the code do? dx = dx * -1;
3. • What does the code do? dy = dy + 1;
4. • What does the code do? int[] numbers = new int[5];
5. • Suppose numbers is [10, 20, 30] • What is printed? for (inti = 0; i< numbers.length; i++){ println(i); }
6. • Suppose numbers is [10, 20, 30] • What is printed? for (inti = 0; i< numbers.length; i++){ println(numbers[i]/10); }
7. • Suppose numbers is [10, 20, 30] • What is printed? for (inti = 0; i< numbers.length; i++){ if(numbers[i] > 20){ println(numbers[i]); } }
8. • What is printed? int max = 5; for (inti = 1; i<= max; i++){ println(i); }
9. • What is Moore’s law?
10. • The brains of the computer, usually a single-chip microprocessor
11. • The circuitry of the main components of the computer, including the CPU, RAM, ROM, and slots for cards
12. • The part of memory that is completely erased when the power is off.
13. • The part of memory that is the fastest – it’s inside the CPU.
14. • One part of a hard drive – has sectors and tracks
15. • The memory that holds the boot-up program
16. • Term that includes disk drives, printers, jump drives, screen, keyboard, and mouse
17. • How data is transmitted from one part of the machine to another
18. • Who is the Yale professor who created the “grand principles” of visualizations?
19. • Name any 2 of Tufte’s Grand Principles of visualization
20. • How can graphs lie (assuming the data is accurate) ?
21. • Excessive, decorative elements in a visualization that serve no purpose with the data
22. • What’s the difference between a .csv and a .tsv file?
23. • What is the process of finding intermediate, unknown values in between known values?
24. • The map command is: map(origValue, origMin, origMax, newMin, newMax); • float score = map(2, 1, 10, 1, 100); • What is the value of score?
25. • What does the lerpColor command do?
Processing • Write a loop that will draw 10 circles, all at different random places on the (500,500) screen
Processing • Write a loop that will draw 10 circles, all at different random places on the (500,500) screen for(inti =1; i<= 10; i++){ float x = random(0,500); float y = random(0,500); ellipse(x,y,20,20); }
HARDWARE • Put in order from slowest memory to fastest: • Cache • Hard drive • Camera (plugged into computer through USB) • RAM • Registers