CS50x 2024 - Lecture 6 - Python
***
This is CS50, Harvard University's introduction to the intellectual enterprises of computer science and the art of programming.
***
TABLE OF CONTENTS
00:00:00 - Introduction
00:01:01 - Python
00:07:24 - Speller
00:13:41 - Filter
00:17:31 - Face Recognition
00:20:53 - Functions
00:33:24 - Types
00:34:47 - Calculator
00:44:45 - Conditionals
00:48:05 - Compare
00:57:18 - Object-Oriented Programming
01:02:54 - Loops
01:13:51 - Meow
01:21:20 - Truncation
01:25:54 - Exceptions
01:33:22 - Mario
01:39:44 - Lists
01:49:18 - Dictionaries
01:59:58 - sys
02:04:04 - pip
***
HOW TO SUBSCRIBE
kzread.info_c...
HOW TO TAKE CS50
edX: cs50.edx.org/
Harvard Extension School: cs50.harvard.edu/extension
Harvard Summer School: cs50.harvard.edu/summer
OpenCourseWare: cs50.harvard.edu/x
HOW TO JOIN CS50 COMMUNITIES
Discord: / discord
Ed: cs50.harvard.edu/x/ed
Facebook Group: / cs50
Faceboook Page: / cs50
GitHub: github.com/cs50
Gitter: gitter.im/cs50/x
Instagram: / cs50
LinkedIn Group: / 7437240
LinkedIn Page: / cs50
Medium: / cs50
Quora: www.quora.com/topic/CS50
Reddit: / cs50
Slack: cs50.edx.org/slack
Snapchat: / cs50
SoundCloud: / cs50
Stack Exchange: cs50.stackexchange.com/
TikTok: / cs50
Twitter: / cs50
KZread: / cs50
HOW TO FOLLOW DAVID J. MALAN
Facebook: / dmalan
GitHub: github.com/dmalan
Instagram: / davidjmalan
LinkedIn: / malan
Quora: www.quora.com/profile/David-J...
TikTok: / davidjmalan
Twitter: / davidjmalan
***
CS50 SHOP
cs50.harvardshop.com/
***
LICENSE
CC BY-NC-SA 4.0
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
creativecommons.org/licenses/...
David J. Malan
cs.harvard.edu/malan
malan@harvard.edu
Пікірлер: 132
"Malloc is gone, pointers are gone, free is gone!" thanks to the lord !
@jeannoelhonisch7037
7 күн бұрын
100%
@kennessu4642
6 күн бұрын
used to pray for times like these
What an amazing professor. Not a single boring moment .
It's mindblowing how a course video with such content quality is free. Thanks, huge thanks, CS50!
@Zachattack0_0
3 ай бұрын
Well, remember, to get a certificate costs about $200. So the course is free to access, but they are certainly making their money back with the number of certifications they give out!
@AA-cy9ib
2 ай бұрын
@@Zachattack0_0 Not true! They also give free certificates which are almost as valuable as paid ones.
@Zachattack0_0
2 ай бұрын
@@AA-cy9ib Where? AFAIK you have to pay for an official Harvard CS50 certificate.
@ihavermsthattypeofbrain8377
22 сағат бұрын
@@Zachattack0_0not really. I think when you go to Harvard edu it's available. It actually have same value as the $200 one
The ending was damn! 😂 well done CS50
@sefonefinpsefnpefn4191
3 ай бұрын
I like it!❤
Incredible teacher, as much a stand up performer as an expert in his field. What energy he puts in his work ...
“I apologize if you’re harboring resentment that this wasn’t a week earlier” 😂It’s okay professor, I have accepted that to understand programming and computer science better, I must dive into lower level stuff occasionally, week 5 was tough but I persevered!
Happy New year to you all!! May 2024 be the best year for your personal growth
can't wait for Javascript lecture so it will break everything we learned here.
Wish i had just one teacher like David Malan or Brian Yu in my entire education journey . :-)
57:18 What a beautiful way to explain what OOP is in basic terms!
@bekay7663
3 ай бұрын
it might because of my little knowledge of OOP previously before starting the course or the Weeks leading up, but in that 5 minute segment I fully understand object oriented programming, or at least have a solid grasp of it.
@mtarik0
3 ай бұрын
That's awesome! I do believe that playing around with C language first makes the transition much better. I started learning programming with Java, and even though our instructors explained us the OOP term in similar ways, we as learners sort of took it for granted. It was because we didn't know what it was like a variable not having built-in functionalities, its advantages, etc. This is why I love CS50 :) Since you feel like as such, you will probably have an easy time of understanding encapsulation, inheritance and the like, best of luck! @@bekay7663
Ah, the endings are always funny and uplifting!
Finally python friends, I discovered CS wold through python years ago, but now with a university, it's very rewarding to go back to studying once again
Just amazing lecture, love it, well done!
He is an excellent teacher.
lovely class, extraordinary
Super energy 😊
TKS U ! CS50 , and the professor Malan Miller!🥰
What an amazing lecture and it is so brilliant to teach C first and then move to Python. After all that C, Python will be gravy train!
Man I love this guy
love the energy
oh wow!! one of the best python video to learn
finally python 🎉❤
Blessed thank you
From EGYPT THIS IS GREAT❤
Дякую! 🙂
Another year, Another CS50
When I watch David's lectures I like to follow copying the code. However, here I wonder where are all those files like speller.py reside, so that I could use them. Is there a repository of some sort? Any ideas?
GOD BLESS YOU!!!!!!
Ending was so funny lol
Дякую!
Can someone please list all the modules (pip) installed during the course! ,thanks in advance
@aopen130
2 ай бұрын
`pip list` in the command prompt. if it doesn't work, make sure the virtual environment is in your PATH you can learn more about syntax for pip list command with `python -m pip list`
Oh, my! We've got rickrolled...again. what a perfect ending for a lecture, that's the perfect description XD
@chinmayachidrewar8856
3 ай бұрын
you ruined it for me🥲
There's no goddamn way we got rickrolled by harvard university
I can feel David Malan's energy
Can we have a CS50 lesson teaching how to crack the programming interview?
Struggling through C to reach the holy grail that is Python!
@radman999
4 ай бұрын
Would be better off sticking with C and C++ instead of a bloatware script language that anyone's mom can do
@mclaren720
4 ай бұрын
@@radman999how many years have you been coding?
@Rayer24
4 ай бұрын
@@radman999
@asadelh.28
4 ай бұрын
@@radman999bloatware script language thats one of the most popular and most used languages in the world, way more than C and C++ and that basically has a monopoly over AI. Youre one of those smooth brains who thinks theyre smart because somehow using verbose languages compensates for your inherent lack of programming skill
@user-mo9bc8lo6b
4 ай бұрын
Monty PYTHON
Is there a rationale for the extra spacing, two blank lines, between code?
@brandy9725
16 күн бұрын
David explains at 1:27:08 that it's a convention to help make functions stand out
Good day
Great
the rickroll at the end lmaoo
The second i saw youtube link i knew what its gonna be
I don't speak english I'm watching whit Subtitule I have 16 years old You're The Best sorry for error
problem set? 🤔
Greatest rickroll 2024
i knew it but im rickrolled too :)
how come i did not know about this amazing thing called cs50 I regret every second in my life i didn't know about this!!
Melan. How are YOU?
question; at 1:56:55 David is making the dictionary caleld people, but he never defines the name person. Yet below that person exists anyway? Why not just do; for name in people: instead and skip the next line ?
@d.k.1545
4 ай бұрын
or does he just use person instead of the generic n variable like _ ?
@VijayGandhinagar
4 ай бұрын
At 1:56:55, the variable "person" is a list of dictionaries, and not a list of strings or integers. Hence you have to access the dictionary first and then look/check if the dictionary has that name, for each dictionary in the list.
@d.k.1545
4 ай бұрын
@@VijayGandhinagar thanks for your reply! really appreciate it. However my question is more so that he doesn't define or initiate a variable or typedef called person and suddenly uses it as for person in (dictionary set name) so it it just an n variable here?
@d.k.1545
4 ай бұрын
Having watched the section I understand it now. as I assumed it's basically an initialized variable with the chosen name person, and it's looking for the input name in the dictionary key of name
@henriktandberg9899
4 ай бұрын
@@d.k.1545 The "person" variable in this case is just like the i in for loops conventionally used in C. It's just a more describing name for the variable doing the counting of each iteration of the loop. I was a bit confused by this as well, but David could have used i or _ as he mentioned earlier and had the same result. He just chose person as it was iterating through dicts of people.
dude is mark rover's brother :D
Did I just get Rickrolled?
got me with the rick roll
Anyone else kind of recognize that URL by now? 😆
malloc(); is GONE 🗿free(); is GONE🗿*pointers are GONE🗿
@harisuresh2507
Ай бұрын
im sold on python rn
I hope professor Malan can cosplay prison Mike.
Give me that
who can learn all this any Prior Experienced
old lecture is posted here in 2024
@HolyHaddock
4 ай бұрын
You mean that this is the 2023 lecture? Sorry me English bad
@farhanarahman9375
4 ай бұрын
nope this is the lecture for 2024
1like = 5pushups in 2024
@user-go.pro1
5 ай бұрын
Hi!!!!,bro you gonna die
@mclaren720
4 ай бұрын
I will join you my brother.
@turtlebeast8812
4 ай бұрын
@@mclaren720I will also join. let's get strong and smart together bros 💪💪💪
@mlfelonzo9156
4 ай бұрын
Do my pushup bruh make sure
@td3de176
4 ай бұрын
You owe 305 pushups bro
Nah, ill stay with C.
@user-vo2tu9hc7z
7 күн бұрын
why?
@user-vo2tu9hc7z
7 күн бұрын
Python is AI bro come on in
@JoseLucasd
7 күн бұрын
@@user-vo2tu9hc7z python is heavy af. It takes like, 40s to run a encryption, and even a compiler like numba or cpython doesnt helps that much, bc python is natively slow. And also, its just too "washed out". Most of python libs like that used for ia or smth is written in c or c++. Thats the reason i dont like it. If it works for u, just use, bc u need to solve problems. And now machines r super fast unlike mine.
who else got rick rolled ?
Nothing new All time same 😂😂.But we always watch.I got it that study in University and pay for the study waste time and money. When in the KZread available free Tutorials and Bootcamps.But after graduated University your knowledge not enough get job in IT company. You go to KZread improve your knowledge for get job. I think it is simple and true fact by my own opinion.
Unbelievable crap!!!
For every like I will write 10 lines of python code
We support Harvard's former president who wasn't afraid to speak the truth!
@d.k.1545
4 ай бұрын
Please give me more context.
Whole of Python in one lecture. What's the point of watching this
@davidbarnhouse4642
4 ай бұрын
This is an intro class. The point is to introduce you to the topic not make you a master.
@Samsung-zg9ql
4 ай бұрын
@@davidbarnhouse4642 rather than making 500 introductory videos of 500 different languages it would be a lot beneficial to make videos of a few topics explaining in detail.. Can't believe people suggest cs50 which is clearly a waste of time...
@CoreyHillesheim
4 ай бұрын
This is just scratching the surface. The CS50P lectures are 16 hours long and only cover the basics.
@davidbarnhouse4642
4 ай бұрын
@@CoreyHillesheim yes, that's the point.
@belabansal3356
4 ай бұрын
@@CoreyHillesheimthey taught like till week 4 of that in this video tbh. I am on week 8 currently of python. But you don’t get the detail of cs50 p obviously. And here and there, there were hints of other weeks
They teach you this in high school in europe. lol cant imagine people let their rich parents pay for this basic stuff. total rip off.
@kejtos5
4 ай бұрын
Ignoring the fact that each country in Europe has their own education system, I am pretty sure vast majority of people has not done any programming at high school and any programming at uni, let alone python.
@-es2bf
4 ай бұрын
@@kejtos5 Most of the people I went to uni with already knew how to code. They wrote their own Java apps in high school. This course is a joke to be honest. How come americans dont feel ripped off, when they go into a lifetime debt to learn the equuvalent of a european high school
@kejtos5
4 ай бұрын
@-es2bf Again, regardless of the quality of US unis (or lack thereof), there is no 'european high school' as every country has their own learning curriculum. The few CS-ish oriented high schools might teach something like Java (or C/C++), but I am almost 100% positive it is not the norm for high schools at most places. And also, universities don't tend to assume any knowledge and starts from the absolute beginning anyway.
@d.k.1545
4 ай бұрын
yeah...not everywhere in Europe bud. Sounds like you went to a school that thought itd be good to teach python, which I hope you enjoyed and helped you in this course.
@staying_substantially6186
4 ай бұрын
Bro it is one lesson, I doubt your high school in europe taught all that in one day
ḍamn that teacher so fast speaking :O , i dont heard , that why im disble person ,reading subtitles only
Now I can tell my friends that David rickrolled me 🥲😂
2:08:11 woww.... first time i got rickrolled without realising it at all.... kzread.info/dash/bejne/qqp6vMyoZbPNd5M.html link of qr code.
🔥iam trapped in this course but love it 🤍🖤