Download presentation
Presentation is loading. Please wait.
Published byErick McCarthy Modified over 8 years ago
1
Professor Ira Fay Class 5
2
Mining survey for() loops arrays cupcake lab
3
Stand up Learn the name of someone you don’t know Sit down
4
Extended deadline due today Walkthrough? Please post website and GitHub link to the shared Google doc https://docs.google.com/spreadsheets/d/1mLW BSuBEUG6xb08D3WJqiw0eRso2Kqe37OwpDh CJAf8
5
Linked from course website http://irafay.com/classes/CS181 Please do it today before you sleep! Thoughtful answers are required Take a moment to reflect
6
Mid-semester self-eval is due! Post to The Hub Five College students can email me
7
What are your goals for this course? How do they relate to your larger educational goals? How were you successful in working toward these goals? How have you struggled to make progress, and why? What specific things did you do to contribute to the class overall? The self-eval is about you, and not about Ira or your peers.
8
Lines of code are executed in order = is an assignment operator Typo-intolerant Variables Methods += and ++ // comments if() enum
9
How could I display the numbers 1 to 9?
10
print (“1”); print (“2”); print (“3”); print (“4”); print (“5”); print (“6”); print (“7”); print (“8”); print (“9”);
11
How could I display the numbers 1 to 99? 1 to 999?
12
// Count from 1 to 9 for (int i = 1; i < 10; i++) { print (i); }
13
// Count from 1 to 99 for (int i = 1; i < 100; i++) { print (i); }
14
// Count from 1 to 999 for (int i = 1; i < 1000; i++) { print (i); }
15
int myRoll; // Roll a die 10 times for (int i = 0; i < 10; i++) { myRoll = Random.Range(1,7); print (myRoll); }
16
int myRoll; // Roll a die 10 times for (int i = 0; i < 10; i++) { myRoll = Random.Range(1,7); // what if I want to remember all rolls? }
17
Arrays are a collection of objects that are the same type For example, 1000 ints Temperature over 5 days
18
int[] temperatures = new int[5]; 01234
19
01234 key or index
20
temperatures[0] = 58; 01234 key or index 58 value
21
int[] temperatures = new int[5]; temperatures[0] = 58; temperatures[1] = 60; temperatures[2] = 70; temperatures[3] = 68; temperatures[4] = 62; 01234 5860706862
22
int[] temperatures = {58,60,70,68,62}; 01234 5860706862
23
int myRoll; // Roll a die 10 times for (int i = 0; i < 10; i++) { myRoll = Random.Range(1,7); // what if I want to remember all rolls? }
24
int[] myRoll = new int[10]; // Roll a die 10 times for (int i = 0; i < 10; i++) { myRoll[i] = Random.Range(1,7); print(myRoll[i]); }
26
Customer walks into a cupcake store and reserves a cupcake Person behind the counter tells them their reservation number
27
Customer decides between frosting: Exactly one is required ▪ Chocolate ▪ Caramel
28
Customer decides between toppings: Any/all/none are allowed ▪ Star sprinkles ▪ Round sprinkles ▪ Tube sprinkles
29
What if no cupcakes remain? What if customer doesn’t want any frosting? Two different cake flavors?
30
Transportation Part 1 Walkthrough appears 48 hours from now Completing Mining Survey Add links to Mining spreadsheet
31
Isaiah + team made a game over the summer! http://stout.hampshire.edu/~ibm13/CraftingLife
32
// Count from 1 to 9 for (int i = 1; i < 10; i++) { print (i); } // We could also use a while() loop int i = 1; while (i < 10) { print (i); i += 1; }
33
With a growth mindset, we can improve our skills through practicing. Learning happens over time, not instantly. The process of learning is uncomfortable when we’re not competent yet.
34
What files Unity creates What files are most important
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.