1 / 6

Looping

Looping. George Mason University. Today’s topics. Review of Chapter 4: Looping Go over examples and questions looping in Python. Looping review. What is the basic idiom for a while loop? Can we loop forever? Can we loop an unknown number of times?

maleah
Download Presentation

Looping

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. Looping George Mason University

  2. Today’s topics • Review of Chapter 4: Looping • Go over examples and questions • looping in Python

  3. Looping review • What is the basic idiom for a while loop? • Can we loop forever? • Can we loop an unknown number of times? • How do we debug a loop? an infinite loop?

  4. Let’s go over the exercises

  5. Looping in python • whileis a keyword allows the indented code beneath it to run as long as its condition is true • a colon is needed at the end of the statement

  6. Questions?

More Related