Premium Only Content

CS50P - Lecture 5 - Unit Tests
TABLE OF CONTENTS
00:00:00 - Introduction
00:00:24 - Unit Tests
00:01:15 - Testing calculator.py
00:10:20 - assert
00:12:18 - AssertionError
00:16:58 - pytest
00:28:38 - Categories of Tests
00:35:53 - Testing for Exceptions
00:38:13 - Side Effects and Testing
00:47:54 - Collections of Tests
00:50:16 - 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!
-
6:55
CS50 Harvard
1 month agoReturn Values - CS50P Shorts
241 -
LIVE
LFA TV
10 hours agoLFA TV LIVE STREAM - FRIDAY 5/30/25
5,804 watching -
1:17:26
JULIE GREEN MINISTRIES
2 hours agoLIVE WITH JULIE
63.8K117 -
DVR
BEK TV
1 day agoTrent Loos in the Morning 5/30/2025
34.2K -
LIVE
The Bubba Army
23 hours agoTiger King Joe Exotic Live from Prison - Bubba the Love Sponge® Show | 5/30/25
3,194 watching -
23:46
The Why Files
1 day agoDark Oxygen | CIA Deep Sea Secret Could Trigger the Next Extinction Event (STRIPPED)
56.7K43 -
1:24:04
Roseanne Barr
19 hours agoTales From The Other Side w/ Darius J. Wright| The Roseanne Barr Podcast #101
58.9K57 -
1:54:52
FreshandFit
12 hours agoThe Future Of Dating And Money With Coach Greg Adams
77.4K12 -
16:42
Dr. Nick Zyrowski
21 days agoFasting Is THE Cure - NO FOOD FOR 7 DAYS Heals Everything!
51K36 -
1:10:44
Savanah Hernandez
13 hours agoThe GOP Sucks So Bad They Demoralized The Most Energetic Pro-America Fighter We Have
186K124