1 / 9

Using Lists and Loops in Lots of Circles

Using Lists and Loops in Lots of Circles. Week 4. Lists. For example: to do list, shopping list In CS : An ordered set of values One name, multiple values, in numbered order Can get to individual items if you know their position How would this be helpful in the QuizMe Hack?. Loops.

tovah
Download Presentation

Using Lists and Loops in Lots of Circles

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using Lists and Loops in Lots of Circles Week 4

  2. Lists • For example: to do list, shopping list • In CS: An ordered set of values • One name, multiple values, in numbered order • Can get to individual items if you know their position • How would this be helpful in the QuizMe Hack?

  3. Loops • Tell the computer to do something over and over • The block of code to repeat is IN the loop. Other code is not in the loop • There must be a condition for the loop to end • Example: Shopping List

  4. Definite Loops • Foreach (member of a list): do something • Automatically end at the end of the list • Example: foreach (class period): go to classforeach (shopping list item): get it • Automatically move to the next member of the list at the end of the commands

  5. Indefinite loops • While (condition is true): do something • End when the condition is not true • Example:While (it is raining): use an umbrella • Do not move through a list, just check a condition at the end of the block of code • Can use a counter to keep track • Example: While (I still have tickets): give next person a ticket

  6. Lots of Circles

  7. Resources If you have problems • Read the App Inventor book on lists and loops (page 267-272 & 281-289) • Post questions to the Technovation Challenge Google Group

  8. Reminder:Weekly Reflections • What did your team like about this week? • What challenges did your team have this week? • Anything else your team would like to share?

  9. Share with us onTwitter & Facebook Tweet us: @_technovation_ #technovation Like us on Facebook: Technovation Challenge

More Related