Join Barron Stone for an in-depth discussion in this video For loops, part of Programming Fundamentals in the Real World.
- Loops are programming constructs…which repeatedly perform an operation…or series of operations over and over and over.…There are two types of loops, for loops and while loops.…One of the key differences between them…is that with a for loop, you know exactly how many times…that loop is going to perform its operation…before it even runs.…Some languages do this by creating a variable…that will count up to a certain value…and for loops can also be used to…iterate through items in a list.…That list will have a certain number of items…which will be the number of times the for loop executes.…
With a while loop, you don't know how many times…a loop is going to be executed.…Instead, as the loop is running,…it's constantly checking and checking…for a condition to determine whether or not…it should execute one more time.…I'll use loops to help me perform a complex operation…that I'm very familiar with, doing the dishes.…My kitchen is a little bit of a mess…and I want to clean it up before my friends come over.…I'll start by loading the dirty dishes from the sink…
- Reusing functions
- Local vs. global variables
- Creating and naming custom objects
- Class inheritance
- Modules and packages
- Multidimensional lists and tuples
- Queues and stacks
- Creating and combining sets
- Storing data in dictionaries
- If/else and switch statements
- For vs. while loops
- Error handling
- Polling and event-driven programming
Skill Level Beginner
Foundations of Programming: Design Patternswith Elisabeth Robson2h 19m Intermediate
3. Class Inheritance
4. Modules and Packages
5. Lists and Tuples
6. Queues and Stacks
9. Conditional Execution
11. Error Handling
12. Polling and Event-Driven Programming
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.