Premium Only Content

CS50P - Lecture 2 - Loops
TABLE OF CONTENTS
00:00:00 - Introduction
00:00:24 - Loops
00:00:50 - cat.py
00:03:24 - while
00:16:21 - for
00:27:00 - Validating Input
00:34:59 - Iteration with Lists
00:40:36 - len
00:45:47 - Dictionaries
00:57:02 - Lists of Dictionaries
01:05:02 - Nested Loops
01:20:17 - Conclusion
An introduction to programming using a language called Python. Learn how to read and write code as well as how to test and "debug" it. Designed for students with or without prior programming experience who'd like to learn Python specifically. Learn about functions, arguments, and return values (oh my!); variables and types; conditionals and Boolean expressions; and loops. Learn how to handle exceptions, find and fix bugs, and write unit tests; use third-party libraries; validate and extract data with regular expressions; model real-world entities with classes, objects, methods, and properties; and read and write files. Hands-on opportunities for lots of practice. Exercises inspired by real-world programming problems. No software required except for a web browser, or you can write code on your own PC or Mac.
Whereas CS50x itself focuses on computer science more generally as well as programming with C, Python, SQL, and JavaScript, this course, aka CS50P, is entirely focused on programming with Python. You can take CS50P before CS50x, during CS50x, or after CS50x. But for an introduction to computer science itself, you should still take CS50x!
-
LIVE
Kim Iversen
3 hours agoTrump Attacks Thomas Massie—But MAGA Isn’t Having It! Is Trump Picking the Wrong Fight?
1,969 watching -
56:31
Glenn Greenwald
2 hours agoUNLOCKED EPISODE: On Europe’s Emergency Defense Summit, the Future of Independent Media, Speech Crackdowns and More
36.4K22 -
43:48
BonginoReport
4 hours agoMainstream Media Plots The Next Plandemic! (Ep.02) - 03/11/2025
80.4K204 -
1:13:13
Michael Franzese
4 hours agoMegyn Kelly’s UNFILTERED Take on The Ukraine War, Trump & Modern Masculinity
46K21 -
1:43:21
Redacted News
5 hours agoBREAKING! UKRAINE AGREES TO CEASEFIRE WITH RUSSIA... BUT THERE'S A BIG CATCH | Redacted News
137K234 -
58:17
Candace Show Podcast
5 hours agoShould We Feel Bad For Blake Lively? | Candace Ep 157
90.8K151 -
3:06:52
The Nerd Realm
6 hours ago $10.76 earnedHollow Knight Voidheart Edition #19 | Nerd Realm Playthrough
58.1K5 -
1:17:27
Awaken With JP
8 hours agoThe Current Thing: Tesla Protesting - LIES Ep 82
104K41 -
1:07:08
Sean Unpaved
5 hours agoNFL Free Agency Rolls On! MLB Spring Training Heats Up along with 3x World Series Champ Dave Stewart
62.7K3 -
2:10:15
Right Side Broadcasting Network
10 hours agoLIVE REPLAY: White House Press Secretary Karoline Leavitt Holds Press Briefing - 3/11/25
154K42