Join Barron Stone for an in-depth discussion in this video Stacks, part of Programming Fundamentals in the Real World.
- While I was outside I grabbed the mail,…and unfortunately, it looks like today…is nothing but bills and junk mail.…As I sorted through my mail,…when I come across a bill,…I'll put it on a stack to be processed.…And, as for the junk mail, I'll just toss that.…So this first item is a bill,…I'll place it on my stack.…The next item is also a bill,…so I'll place it into the stack on top of that first one.…Junk mail, junk mail.…Another bill, that goes on the stack.…Junk mail, and a bill.…
Now, the bills on my stack are ordered from top to bottom…with the most recent bill I put onto the stack at the top,…and the oldest bill at the bottom.…When I'm ready to begin paying these bills,…I'll grab the last envelope that I put onto the stack,…which is at the top,…and I'll start working my way down the stack…paying my bills in the opposite order…that I put them onto the stack.…- Hey, it looks like you dropped a bill on the way in.…- Whoops! Well, I'll just put that here on top of the stack.…Since that bill Olivia found…is the newest item on the stack,…
- 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.