SlideShare a Scribd company logo
1 of 18
Download to read offline
From last time…
•

We played with Pong!

•

Please turn in Homework 1
Proposal!
Feedback

CAP
Proposals
•

Check your email, take action if needed!

•

Scope, definition, and clarifications!

•

Thoughts and examples!

•

Think of this as a loose ‘contract’!

•

Next steps: iteration plan and group formation
What is Agile?

CAP
(Semi-) Agile
•

Follow “user stories” rather than specifications!

•

Frequent check-ins (scrums) with your team!

•

2 week development cycles (sprints)!

•

We will be meeting in groups on a regular basis,
will have quick scrums, then show off our work,
~ 3 week development sprints
Looooooooops

CAP
while()
while (conditional_statement) {
// execute this code
}
Demo!
While Loops
Infinite Loops (!!!)
while (conditional_statement) {
// execute this code
}
•

If your conditional statement is never going to be
false, the loop will never stop executing!

•

This is bad.
for()
for (int i = 0; i < 10; i++) {
print(i);
}
!

0123456789
1. Initialization
•

Declare and initialize a variable!

•

Most often:

•

This could be used as a counter inside the loop,
or could be ignored within the loop

for( int i = 0;
2. Boolean Test
•

Create a conditional statement that must
evaluate to true or false!

•

Most often:

•

We’ve seen these conditional statements before

i < numberOfIterations;
3. Iteration Expression
•

What happens at the end of each loop?!

•

Most often:

•

Increment or decrement are common here

i++) {}
Memorize the For Loop
for (int i = 0; i < 10; i++) {
print(i);
}
!

These are extremely helpful in many ways
and you will use them often
Demo!
Nested For-Loops
Particle Fever
http://www.youtube.com/watch?v=Rikc7foqvRI
Particle Fever
http://www.youtube.com/watch?v=Rikc7foqvRI
For next time…
•

Read and respond to your proposal feedback
(if you haven’t already)!

•

Memorize the for loop!

•

Read Shiffman, p. 90–98 (Loops II)!

•

Also… start thinking about Iteration 1

More Related Content

What's hot

Future Friendly Style Guides
Future Friendly Style GuidesFuture Friendly Style Guides
Future Friendly Style GuidesLuke Brooker
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with DatabasesStephen Ritchie
 
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...J On The Beach
 
[System design] Design a tweeter-like system
[System design] Design a tweeter-like system[System design] Design a tweeter-like system
[System design] Design a tweeter-like systemAree Oh
 
Challenges of moving a java team to scala
Challenges of moving a java team to scalaChallenges of moving a java team to scala
Challenges of moving a java team to scalaJoão Cavalheiro
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersStephen Ritchie
 

What's hot (6)

Future Friendly Style Guides
Future Friendly Style GuidesFuture Friendly Style Guides
Future Friendly Style Guides
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with Databases
 
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
 
[System design] Design a tweeter-like system
[System design] Design a tweeter-like system[System design] Design a tweeter-like system
[System design] Design a tweeter-like system
 
Challenges of moving a java team to scala
Challenges of moving a java team to scalaChallenges of moving a java team to scala
Challenges of moving a java team to scala
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and Dangers
 

Viewers also liked

Kng 2014 fall catalog
Kng 2014 fall catalogKng 2014 fall catalog
Kng 2014 fall catalogNiccole @ KNG
 
αναστάσιμα έθιμα ανά την ελλάδα
αναστάσιμα έθιμα ανά την ελλάδααναστάσιμα έθιμα ανά την ελλάδα
αναστάσιμα έθιμα ανά την ελλάδαkelesonia
 
Memoria DIAS 2013
Memoria DIAS 2013Memoria DIAS 2013
Memoria DIAS 2013dias_info
 
Social media fox
Social media foxSocial media fox
Social media foxtucker6
 

Viewers also liked (13)

21. Mathematics II
21. Mathematics II21. Mathematics II
21. Mathematics II
 
29. Text I
29. Text I29. Text I
29. Text I
 
Kng 2014 fall catalog
Kng 2014 fall catalogKng 2014 fall catalog
Kng 2014 fall catalog
 
19. Algorithms II
19. Algorithms II19. Algorithms II
19. Algorithms II
 
Dmx
DmxDmx
Dmx
 
αναστάσιμα έθιμα ανά την ελλάδα
αναστάσιμα έθιμα ανά την ελλάδααναστάσιμα έθιμα ανά την ελλάδα
αναστάσιμα έθιμα ανά την ελλάδα
 
Memoria DIAS 2013
Memoria DIAS 2013Memoria DIAS 2013
Memoria DIAS 2013
 
11. Functions II
11. Functions II11. Functions II
11. Functions II
 
14. Arrays I
14. Arrays I14. Arrays I
14. Arrays I
 
6. Conditionals I
6. Conditionals I6. Conditionals I
6. Conditionals I
 
27. Video I
27. Video I27. Video I
27. Video I
 
Social media fox
Social media foxSocial media fox
Social media fox
 
Grantley Adams
Grantley AdamsGrantley Adams
Grantley Adams
 

Similar to 8. Loops I

Introduction to agile and Scrum
Introduction to agile and ScrumIntroduction to agile and Scrum
Introduction to agile and ScrumScrum & Kanban
 
Agile Estimation @ Lean Agile Manchester: Make Estimates Small!
Agile Estimation @ Lean Agile Manchester: Make Estimates Small!Agile Estimation @ Lean Agile Manchester: Make Estimates Small!
Agile Estimation @ Lean Agile Manchester: Make Estimates Small!Axelisys Limited
 
Agile in 1,5 hours : brief introduction
Agile in 1,5 hours : brief introductionAgile in 1,5 hours : brief introduction
Agile in 1,5 hours : brief introductionKostetska Galyna
 
Kanban, Flow and Cadence
Kanban, Flow and CadenceKanban, Flow and Cadence
Kanban, Flow and CadenceAaron Sanders
 
Agile Predictability
Agile PredictabilityAgile Predictability
Agile Predictabilityagilesamurai
 
ToT UK 2018- Pizza Kanban Workshop
ToT UK 2018- Pizza Kanban WorkshopToT UK 2018- Pizza Kanban Workshop
ToT UK 2018- Pizza Kanban WorkshopTOPdesk
 
Pizza Kanban Workshop - Andreyna Gonzalez
Pizza Kanban Workshop - Andreyna GonzalezPizza Kanban Workshop - Andreyna Gonzalez
Pizza Kanban Workshop - Andreyna GonzalezTOPdesk
 
Jeff Lopez - To Affinity and Beyond
Jeff Lopez - To Affinity and BeyondJeff Lopez - To Affinity and Beyond
Jeff Lopez - To Affinity and BeyondAgile Impact
 
Morph your mindset for Continuous Delivery, Agile Roots 2014
Morph your mindset for Continuous Delivery,  Agile Roots 2014Morph your mindset for Continuous Delivery,  Agile Roots 2014
Morph your mindset for Continuous Delivery, Agile Roots 2014lisacrispin
 
Scrum and-xp-from-the-trenches 03 sprint backlog & daily scrum
Scrum and-xp-from-the-trenches 03 sprint backlog & daily scrumScrum and-xp-from-the-trenches 03 sprint backlog & daily scrum
Scrum and-xp-from-the-trenches 03 sprint backlog & daily scrumHossam Hassan
 
Scrum Plus Extreme Programming (XP) for Hyper Productivity
Scrum Plus Extreme Programming (XP) for Hyper ProductivityScrum Plus Extreme Programming (XP) for Hyper Productivity
Scrum Plus Extreme Programming (XP) for Hyper ProductivityRon Quartel
 
Introduction to Agile & Scrum
Introduction to Agile & ScrumIntroduction to Agile & Scrum
Introduction to Agile & ScrumHawkman Academy
 
Scrum and-xp-from-the-trenches 01 intro & backlog
Scrum and-xp-from-the-trenches 01 intro & backlogScrum and-xp-from-the-trenches 01 intro & backlog
Scrum and-xp-from-the-trenches 01 intro & backlogHossam Hassan
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to KanbanScrum & Kanban
 
Agile: the Good, the Bad and the Ugly - Webinar by Clarke Ching Agile - Septe...
Agile: the Good, the Bad and the Ugly - Webinar by Clarke Ching Agile - Septe...Agile: the Good, the Bad and the Ugly - Webinar by Clarke Ching Agile - Septe...
Agile: the Good, the Bad and the Ugly - Webinar by Clarke Ching Agile - Septe...MARRIS Consulting
 
Iiba.november.09
Iiba.november.09Iiba.november.09
Iiba.november.09Terry Bunio
 
Going loopy - Introduction to Loops.pptx
Going loopy - Introduction to Loops.pptxGoing loopy - Introduction to Loops.pptx
Going loopy - Introduction to Loops.pptxAmy Nightingale
 

Similar to 8. Loops I (20)

Introduction to agile and Scrum
Introduction to agile and ScrumIntroduction to agile and Scrum
Introduction to agile and Scrum
 
Agile Estimation @ Lean Agile Manchester: Make Estimates Small!
Agile Estimation @ Lean Agile Manchester: Make Estimates Small!Agile Estimation @ Lean Agile Manchester: Make Estimates Small!
Agile Estimation @ Lean Agile Manchester: Make Estimates Small!
 
Agile in 1,5 hours : brief introduction
Agile in 1,5 hours : brief introductionAgile in 1,5 hours : brief introduction
Agile in 1,5 hours : brief introduction
 
Kanban, Flow and Cadence
Kanban, Flow and CadenceKanban, Flow and Cadence
Kanban, Flow and Cadence
 
Agile Predictability
Agile PredictabilityAgile Predictability
Agile Predictability
 
ToT UK 2018- Pizza Kanban Workshop
ToT UK 2018- Pizza Kanban WorkshopToT UK 2018- Pizza Kanban Workshop
ToT UK 2018- Pizza Kanban Workshop
 
Pizza Kanban Workshop - Andreyna Gonzalez
Pizza Kanban Workshop - Andreyna GonzalezPizza Kanban Workshop - Andreyna Gonzalez
Pizza Kanban Workshop - Andreyna Gonzalez
 
Jeff Lopez - To Affinity and Beyond
Jeff Lopez - To Affinity and BeyondJeff Lopez - To Affinity and Beyond
Jeff Lopez - To Affinity and Beyond
 
Jeff Lopez - To Affinity and Beyond
Jeff Lopez - To Affinity and BeyondJeff Lopez - To Affinity and Beyond
Jeff Lopez - To Affinity and Beyond
 
Morph your mindset for Continuous Delivery, Agile Roots 2014
Morph your mindset for Continuous Delivery,  Agile Roots 2014Morph your mindset for Continuous Delivery,  Agile Roots 2014
Morph your mindset for Continuous Delivery, Agile Roots 2014
 
Scrum and-xp-from-the-trenches 03 sprint backlog & daily scrum
Scrum and-xp-from-the-trenches 03 sprint backlog & daily scrumScrum and-xp-from-the-trenches 03 sprint backlog & daily scrum
Scrum and-xp-from-the-trenches 03 sprint backlog & daily scrum
 
Scrum Plus Extreme Programming (XP) for Hyper Productivity
Scrum Plus Extreme Programming (XP) for Hyper ProductivityScrum Plus Extreme Programming (XP) for Hyper Productivity
Scrum Plus Extreme Programming (XP) for Hyper Productivity
 
Why Scrum
Why ScrumWhy Scrum
Why Scrum
 
Introduction to Agile & Scrum
Introduction to Agile & ScrumIntroduction to Agile & Scrum
Introduction to Agile & Scrum
 
Scrum and-xp-from-the-trenches 01 intro & backlog
Scrum and-xp-from-the-trenches 01 intro & backlogScrum and-xp-from-the-trenches 01 intro & backlog
Scrum and-xp-from-the-trenches 01 intro & backlog
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to Kanban
 
Agile: the Good, the Bad and the Ugly - Webinar by Clarke Ching Agile - Septe...
Agile: the Good, the Bad and the Ugly - Webinar by Clarke Ching Agile - Septe...Agile: the Good, the Bad and the Ugly - Webinar by Clarke Ching Agile - Septe...
Agile: the Good, the Bad and the Ugly - Webinar by Clarke Ching Agile - Septe...
 
Iiba.november.09
Iiba.november.09Iiba.november.09
Iiba.november.09
 
Going loopy - Introduction to Loops.pptx
Going loopy - Introduction to Loops.pptxGoing loopy - Introduction to Loops.pptx
Going loopy - Introduction to Loops.pptx
 
Kanban for Business
Kanban for BusinessKanban for Business
Kanban for Business
 

More from Joseph Murphy

More from Joseph Murphy (20)

33. Input II
33. Input II33. Input II
33. Input II
 
32. Input I
32. Input I32. Input I
32. Input I
 
30. Text II
30. Text II30. Text II
30. Text II
 
28. Video II
28. Video II28. Video II
28. Video II
 
26. Images II
26. Images II26. Images II
26. Images II
 
25. Images I
25. Images I25. Images I
25. Images I
 
24. Translation & Rotation II
24. Translation & Rotation II24. Translation & Rotation II
24. Translation & Rotation II
 
23. Final Project Iteration II
23. Final Project Iteration II23. Final Project Iteration II
23. Final Project Iteration II
 
34. Final Project Iteration 3
34. Final Project Iteration 334. Final Project Iteration 3
34. Final Project Iteration 3
 
22. Translation & Rotation I
22. Translation & Rotation I22. Translation & Rotation I
22. Translation & Rotation I
 
20. Mathematics I
20. Mathematics I20. Mathematics I
20. Mathematics I
 
A. Design Thinking Lecture
A. Design Thinking LectureA. Design Thinking Lecture
A. Design Thinking Lecture
 
18. Algorithms
18. Algorithms18. Algorithms
18. Algorithms
 
15. Final Project - Iteration 1
15. Final Project - Iteration 115. Final Project - Iteration 1
15. Final Project - Iteration 1
 
13. Objects II
13. Objects II13. Objects II
13. Objects II
 
12. Objects I
12. Objects I12. Objects I
12. Objects I
 
10. Function I
10. Function I10. Function I
10. Function I
 
9. Loops II
9. Loops II9. Loops II
9. Loops II
 
7. Conditionals II
7. Conditionals II7. Conditionals II
7. Conditionals II
 
5. Variables
5. Variables5. Variables
5. Variables
 

Recently uploaded

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 

Recently uploaded (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 

8. Loops I