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

  • @justanothernothuman
    @justanothernothuman17 күн бұрын

    "Malloc is gone, pointers are gone, free is gone!" thanks to the lord !

  • @jeannoelhonisch7037

    @jeannoelhonisch7037

    7 күн бұрын

    100%

  • @kennessu4642

    @kennessu4642

    6 күн бұрын

    used to pray for times like these

  • @jrb65
    @jrb653 ай бұрын

    What an amazing professor. Not a single boring moment .

  • @FarizDarari
    @FarizDarari3 ай бұрын

    It's mindblowing how a course video with such content quality is free. Thanks, huge thanks, CS50!

  • @Zachattack0_0

    @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

    @AA-cy9ib

    2 ай бұрын

    @@Zachattack0_0 Not true! They also give free certificates which are almost as valuable as paid ones.

  • @Zachattack0_0

    @Zachattack0_0

    2 ай бұрын

    ​@@AA-cy9ib Where? AFAIK you have to pay for an official Harvard CS50 certificate.

  • @ihavermsthattypeofbrain8377

    @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

  • @harshgawali5154
    @harshgawali51544 ай бұрын

    The ending was damn! 😂 well done CS50

  • @sefonefinpsefnpefn4191

    @sefonefinpsefnpefn4191

    3 ай бұрын

    I like it!❤

  • @neclis7777
    @neclis77772 ай бұрын

    Incredible teacher, as much a stand up performer as an expert in his field. What energy he puts in his work ...

  • @bassycounter
    @bassycounterАй бұрын

    “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!

  • @AskforQAli
    @AskforQAli5 ай бұрын

    Happy New year to you all!! May 2024 be the best year for your personal growth

  • @aopen130
    @aopen1302 ай бұрын

    can't wait for Javascript lecture so it will break everything we learned here.

  • @hhhhh00000
    @hhhhh000004 ай бұрын

    Wish i had just one teacher like David Malan or Brian Yu in my entire education journey . :-)

  • @mtarik0
    @mtarik03 ай бұрын

    57:18 What a beautiful way to explain what OOP is in basic terms!

  • @bekay7663

    @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

    @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

  • @brooksgunn5235
    @brooksgunn52354 ай бұрын

    Ah, the endings are always funny and uplifting!

  • @angelofinassu4867
    @angelofinassu48673 ай бұрын

    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

  • @xiaoyangshawnhuang1251
    @xiaoyangshawnhuang12513 ай бұрын

    Just amazing lecture, love it, well done!

  • @prjerry7777
    @prjerry77772 ай бұрын

    He is an excellent teacher.

  • @user-si4tb7cr9t
    @user-si4tb7cr9t2 ай бұрын

    lovely class, extraordinary

  • @DeshBhakt588
    @DeshBhakt5883 ай бұрын

    Super energy 😊

  • @hedgehog_hey
    @hedgehog_heyАй бұрын

    TKS U ! CS50 , and the professor Malan Miller!🥰

  • @user-ji9gq3pu1d
    @user-ji9gq3pu1dАй бұрын

    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!

  • @Ubiselfs
    @Ubiselfs2 ай бұрын

    Man I love this guy

  • @zahidsayil9066
    @zahidsayil90664 ай бұрын

    love the energy

  • @user-bs9hz1eu7s
    @user-bs9hz1eu7s4 ай бұрын

    oh wow!! one of the best python video to learn

  • @sefonefinpsefnpefn4191
    @sefonefinpsefnpefn41913 ай бұрын

    finally python 🎉❤

  • @willperry1147
    @willperry114724 күн бұрын

    Blessed thank you

  • @user-fe4ru2op1x
    @user-fe4ru2op1x18 күн бұрын

    From EGYPT THIS IS GREAT❤

  • @user-jc7md5mi4g
    @user-jc7md5mi4g3 ай бұрын

    Дякую! 🙂

  • @Dragon4526
    @Dragon45265 ай бұрын

    Another year, Another CS50

  • @eleos11
    @eleos11Ай бұрын

    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?

  • @shinthantkaung
    @shinthantkaung21 күн бұрын

    GOD BLESS YOU!!!!!!

  • @hasirash6786
    @hasirash67863 ай бұрын

    Ending was so funny lol

  • @Serhii007
    @Serhii0075 ай бұрын

    Дякую!

  • @bx7gamer
    @bx7gamer2 ай бұрын

    Can someone please list all the modules (pip) installed during the course! ,thanks in advance

  • @aopen130

    @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`

  • @javanatto
    @javanatto4 ай бұрын

    Oh, my! We've got rickrolled...again. what a perfect ending for a lecture, that's the perfect description XD

  • @chinmayachidrewar8856

    @chinmayachidrewar8856

    3 ай бұрын

    you ruined it for me🥲

  • @zikeng5444
    @zikeng54443 ай бұрын

    There's no goddamn way we got rickrolled by harvard university

  • @wonkanese
    @wonkanese4 ай бұрын

    I can feel David Malan's energy

  • @kitgary
    @kitgary5 ай бұрын

    Can we have a CS50 lesson teaching how to crack the programming interview?

  • @Mustafa_Tahaha
    @Mustafa_Tahaha5 ай бұрын

    Struggling through C to reach the holy grail that is Python!

  • @radman999

    @radman999

    4 ай бұрын

    Would be better off sticking with C and C++ instead of a bloatware script language that anyone's mom can do

  • @mclaren720

    @mclaren720

    4 ай бұрын

    @@radman999how many years have you been coding?

  • @Rayer24

    @Rayer24

    4 ай бұрын

    @@radman999

  • @asadelh.28

    @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

    @user-mo9bc8lo6b

    4 ай бұрын

    Monty PYTHON

  • @Jonathanmillspatrick
    @Jonathanmillspatrick25 күн бұрын

    Is there a rationale for the extra spacing, two blank lines, between code?

  • @brandy9725

    @brandy9725

    16 күн бұрын

    David explains at 1:27:08 that it's a convention to help make functions stand out

  • @kenyhu4759
    @kenyhu47592 ай бұрын

    Good day

  • @jesuscarrillo7411
    @jesuscarrillo74113 ай бұрын

    Great

  • @airkh.
    @airkh.2 ай бұрын

    the rickroll at the end lmaoo

  • @throwaway-ji4bh
    @throwaway-ji4bh2 ай бұрын

    The second i saw youtube link i knew what its gonna be

  • @randomenia
    @randomenia3 ай бұрын

    I don't speak english I'm watching whit Subtitule I have 16 years old You're The Best sorry for error

  • @ShahbazG
    @ShahbazG5 күн бұрын

    problem set? 🤔

  • @mfbbbbbbbbbbbbbbbbbb
    @mfbbbbbbbbbbbbbbbbbbАй бұрын

    Greatest rickroll 2024

  • @grindinguy
    @grindinguy3 ай бұрын

    i knew it but im rickrolled too :)

  • @spodi4real
    @spodi4real4 ай бұрын

    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!!

  • @nazmulalam7125
    @nazmulalam71253 ай бұрын

    Melan. How are YOU?

  • @d.k.1545
    @d.k.15454 ай бұрын

    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

    @d.k.1545

    4 ай бұрын

    or does he just use person instead of the generic n variable like _ ?

  • @VijayGandhinagar

    @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

    @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

    @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

    @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.

  • @PhilipDenys
    @PhilipDenys4 ай бұрын

    dude is mark rover's brother :D

  • @tahmidnewaz3082
    @tahmidnewaz30824 ай бұрын

    Did I just get Rickrolled?

  • @juli.72
    @juli.72Ай бұрын

    got me with the rick roll

  • @mk810
    @mk8106 сағат бұрын

    Anyone else kind of recognize that URL by now? 😆

  • @boks02_
    @boks02_2 ай бұрын

    malloc(); is GONE 🗿free(); is GONE🗿*pointers are GONE🗿

  • @harisuresh2507

    @harisuresh2507

    Ай бұрын

    im sold on python rn

  • @waffle6579
    @waffle6579Ай бұрын

    I hope professor Malan can cosplay prison Mike.

  • @wonkanese
    @wonkanese4 ай бұрын

    Give me that

  • @karacg
    @karacg4 ай бұрын

    who can learn all this any Prior Experienced

  • @MrMfrk
    @MrMfrk4 ай бұрын

    old lecture is posted here in 2024

  • @HolyHaddock

    @HolyHaddock

    4 ай бұрын

    You mean that this is the 2023 lecture? Sorry me English bad

  • @farhanarahman9375

    @farhanarahman9375

    4 ай бұрын

    nope this is the lecture for 2024

  • @syedzainulabideen4455
    @syedzainulabideen44555 ай бұрын

    1like = 5pushups in 2024

  • @user-go.pro1

    @user-go.pro1

    5 ай бұрын

    Hi!!!!,bro you gonna die

  • @mclaren720

    @mclaren720

    4 ай бұрын

    I will join you my brother.

  • @turtlebeast8812

    @turtlebeast8812

    4 ай бұрын

    ​@@mclaren720I will also join. let's get strong and smart together bros 💪💪💪

  • @mlfelonzo9156

    @mlfelonzo9156

    4 ай бұрын

    Do my pushup bruh make sure

  • @td3de176

    @td3de176

    4 ай бұрын

    You owe 305 pushups bro

  • @JoseLucasd
    @JoseLucasd15 күн бұрын

    Nah, ill stay with C.

  • @user-vo2tu9hc7z

    @user-vo2tu9hc7z

    7 күн бұрын

    why?

  • @user-vo2tu9hc7z

    @user-vo2tu9hc7z

    7 күн бұрын

    Python is AI bro come on in

  • @JoseLucasd

    @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.

  • @ShubhamJha-rl9ss
    @ShubhamJha-rl9ss18 күн бұрын

    who else got rick rolled ?

  • @TonyTony-dl9xr
    @TonyTony-dl9xr2 ай бұрын

    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.

  • @hannukoistinen5329
    @hannukoistinen53292 ай бұрын

    Unbelievable crap!!!

  • @VeNoMoP_69
    @VeNoMoP_694 ай бұрын

    For every like I will write 10 lines of python code

  • @nureke-dp1nw
    @nureke-dp1nw4 ай бұрын

    We support Harvard's former president who wasn't afraid to speak the truth!

  • @d.k.1545

    @d.k.1545

    4 ай бұрын

    Please give me more context.

  • @Samsung-zg9ql
    @Samsung-zg9ql4 ай бұрын

    Whole of Python in one lecture. What's the point of watching this

  • @davidbarnhouse4642

    @davidbarnhouse4642

    4 ай бұрын

    This is an intro class. The point is to introduce you to the topic not make you a master.

  • @Samsung-zg9ql

    @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

    @CoreyHillesheim

    4 ай бұрын

    This is just scratching the surface. The CS50P lectures are 16 hours long and only cover the basics.

  • @davidbarnhouse4642

    @davidbarnhouse4642

    4 ай бұрын

    @@CoreyHillesheim yes, that's the point.

  • @belabansal3356

    @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

  • @-es2bf
    @-es2bf4 ай бұрын

    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

    @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

    @-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

    @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

    @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

    @staying_substantially6186

    4 ай бұрын

    Bro it is one lesson, I doubt your high school in europe taught all that in one day

  • @shanksshaki
    @shanksshaki3 ай бұрын

    ḍamn that teacher so fast speaking :O , i dont heard , that why im disble person ,reading subtitles only

  • @arungjose1849
    @arungjose1849Ай бұрын

    Now I can tell my friends that David rickrolled me 🥲😂

  • @dazai826
    @dazai8262 ай бұрын

    2:08:11 woww.... first time i got rickrolled without realising it at all.... kzread.info/dash/bejne/qqp6vMyoZbPNd5M.html link of qr code.

  • @karimashraf-mb5wb
    @karimashraf-mb5wb4 ай бұрын

    🔥iam trapped in this course but love it 🤍🖤