CS50x 2024 - Lecture 6 - Python

  Рет қаралды 421,713

CS50

CS50

Күн бұрын

Пікірлер
@jrb65
@jrb65 10 ай бұрын
What an amazing professor. Not a single boring moment .
@justanothernothuman
@justanothernothuman 7 ай бұрын
"Malloc is gone, pointers are gone, free is gone!" thanks to the lord !
@jeannoelhonisch7037
@jeannoelhonisch7037 7 ай бұрын
100%
@kennessu4642
@kennessu4642 7 ай бұрын
used to pray for times like these
@pratyush842
@pratyush842 6 ай бұрын
My dream
@NOOR-dy6yn
@NOOR-dy6yn 5 ай бұрын
waiting for : coding gone ...
@ZerubbabelT.
@ZerubbabelT. 5 ай бұрын
@@NOOR-dy6yn Maybe next week when AI arrives😄
@neclis7777
@neclis7777 9 ай бұрын
Incredible teacher, as much a stand up performer as an expert in his field. What energy he puts in his work ...
@bassycounter
@bassycounter 8 ай бұрын
“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!
@tower1990
@tower1990 26 күн бұрын
I was completely lost in week 4 and 5. For now, guess I’ll just forget all about them🤣🤣🤣
@gauravrawat.7
@gauravrawat.7 5 ай бұрын
00:02 Transition from C to Python 03:11 In Python, programs no longer need to be compiled before running, unlike C programs. 07:11 Python allows escaping of apostrophes and offers quicker implementation for real work. 09:19 Defining functions and manipulating sets of words in Python 13:41 How to blur an image using Python and PIL library 15:54 Python makes solving problems more efficient and readily. 20:16 Python's popularity and CS50's goal to teach programming 22:05 In Python, you import the name of the library instead of including a .h file, allowing for more precise control over the specific functions you want to use. 25:49 Python provides three ways to concatenate strings. 27:57 Different ways of concatenating strings in Python 31:50 Python makes variable declaration and manipulation simpler. 33:54 Python simplifies variable types for ease of use. 37:43 Input from keyboard is treated as strings in Python 39:52 Converting x and y to integers in Python using int() function. 43:43 Importing libraries and avoiding function collisions in Python. 45:45 Python uses indentation instead of curly braces for code blocks 49:32 Python strings behave differently than in C 51:33 Python is meant to be higher-level and more accessible. 55:43 Designing a solution for handling Y and Yes without capitalization. 57:40 Strings in Python come with built-in functions for operations like uppercase, lowercase, etc. 1:01:46 Introduction to using loops in Python 1:03:42 Python uses a more concise syntax for looping compared to C. 1:07:23 Python makes looping easier than C using iterable objects. 1:09:23 Python's print() function can customize line endings. 1:13:42 Introducing loops and creating functions in Python 1:15:29 Defining and calling a custom function in Python 1:19:24 Enhancing function implementation with parameters in Python 1:21:13 Python handles truncation differently than C 1:25:00 Python has advantages over C in handling floating point precision and integer overflow. 1:26:57 Introduction to using functions in Python 1:30:51 The get_int() function in Python involves input, conversion to integer, and exception handling for ValueError. 1:32:41 Handling exceptions in Python and using loops to create Mario-like structures 1:36:32 Using loops and Pythonic implementation 1:38:36 Python lists automatically handle memory and are like linked lists 1:42:30 Python allows for easy manipulation of lists using built-in functions and methods. 1:44:38 Adding lists in Python and linear search 1:48:20 Python allows for efficient searching and data storage using dictionaries. 1:50:25 Creating a list of dictionaries in Python 1:54:35 Python uses square brackets with strings to access dictionary instead of dot notation used in C. 1:56:26 You can simplify dictionaries and use single quotes to avoid mixing double quotes in Python. 2:00:44 Using command-line arguments and sys library in Python 2:02:44 Using sys module in Python for command-line arguments and program exits. 2:07:01 Creating QR code in Python.
@ranting8677
@ranting8677 3 ай бұрын
Thank you my man
@katosembatya8353
@katosembatya8353 2 ай бұрын
Thank you
@FarizDarari
@FarizDarari 10 ай бұрын
It's mindblowing how a course video with such content quality is free. Thanks, huge thanks, CS50!
@Zachattack0_0
@Zachattack0_0 10 ай бұрын
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 9 ай бұрын
@@Zachattack0_0 Not true! They also give free certificates which are almost as valuable as paid ones.
@Zachattack0_0
@Zachattack0_0 9 ай бұрын
​@@AA-cy9ib Where? AFAIK you have to pay for an official Harvard CS50 certificate.
@ihavermsthattypeofbrain8377
@ihavermsthattypeofbrain8377 7 ай бұрын
​@@Zachattack0_0not really. I think when you go to Harvard edu it's available. It actually have same value as the $200 one
@padhlekaamaayega
@padhlekaamaayega 6 ай бұрын
@@Zachattack0_0 nope
@mtarik0
@mtarik0 10 ай бұрын
57:18 What a beautiful way to explain what OOP is in basic terms!
@bekay7663
@bekay7663 10 ай бұрын
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 10 ай бұрын
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
@lebronuy2223
@lebronuy2223 5 ай бұрын
They just rickrolled an entire lecture room 😂
@JorysMAHAMBA
@JorysMAHAMBA 3 ай бұрын
and all of us too 😂
@emiliosaliba8320
@emiliosaliba8320 6 ай бұрын
Best IT proffessor i ever had, amazing explanations , dinamic, thanx a lot from a poor southamerican
@angelofinassu4867
@angelofinassu4867 10 ай бұрын
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
@brooksgunn5235
@brooksgunn5235 11 ай бұрын
Ah, the endings are always funny and uplifting!
@AskforQAli
@AskforQAli Жыл бұрын
Happy New year to you all!! May 2024 be the best year for your personal growth
@taha7shaikh
@taha7shaikh 5 ай бұрын
Once again, What a lecture! Forever grateful to the cs50 team for putting this course up for free. We love it.
@harshgawali5154
@harshgawali5154 11 ай бұрын
The ending was damn! 😂 well done CS50
@sefonefinpsefnpefn4191
@sefonefinpsefnpefn4191 10 ай бұрын
I like it!❤
@aopen130
@aopen130 9 ай бұрын
can't wait for Javascript lecture so it will break everything we learned here.
@hhhhh00000
@hhhhh00000 11 ай бұрын
Wish i had just one teacher like David Malan or Brian Yu in my entire education journey . :-)
@prjerry7777
@prjerry7777 9 ай бұрын
He is an excellent teacher.
@nathaishik
@nathaishik 2 ай бұрын
1:56:45 For those who are using Python 3.12 (can't say about the above versions just now), you can use double quotes inside as well (tho I would personally avoid it to reduce confusion and maintain backward compatibility)
@tower1990
@tower1990 26 күн бұрын
This makes me appreciate Python much more. Thank you
@zikeng5444
@zikeng5444 9 ай бұрын
There's no goddamn way we got rickrolled by harvard university
@jae_pmin
@jae_pmin 2 ай бұрын
we sure did
@hedgehog_hey
@hedgehog_hey 8 ай бұрын
TKS U ! CS50 , and the professor Malan Miller!🥰
@GenZ_01_
@GenZ_01_ 4 ай бұрын
Well done, I appreciate your efforts cs50 team . Thank you so much!
@Ubiselfs
@Ubiselfs 9 ай бұрын
Man I love this guy
@chris-w5r6i
@chris-w5r6i 8 ай бұрын
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!
@pranshuatrey
@pranshuatrey 6 ай бұрын
What a perfect ending
@ChickpeaMilkshake
@ChickpeaMilkshake 4 ай бұрын
Broken my collarbone last week, but watching this keeps my mind off the pain.
@RameezRassel
@RameezRassel 3 ай бұрын
the bots are getting crazy these days
@ChickpeaMilkshake
@ChickpeaMilkshake Ай бұрын
@@RameezRassel lol I wish it weren't true
@MudasirChanna-m3d
@MudasirChanna-m3d 11 ай бұрын
oh wow!! one of the best python video to learn
@xiaoyangshawnhuang1251
@xiaoyangshawnhuang1251 10 ай бұрын
Just amazing lecture, love it, well done!
@fvilpaz
@fvilpaz 3 ай бұрын
this lecture, one of my favorites
@UNISTUDY-p9p
@UNISTUDY-p9p 7 ай бұрын
From EGYPT THIS IS GREAT❤
@公主肥肥
@公主肥肥 9 ай бұрын
lovely class, extraordinary
@DeshBhakt588
@DeshBhakt588 10 ай бұрын
Super energy 😊
@monitorstolenfromikea
@monitorstolenfromikea 5 ай бұрын
Lowkey gonna miss C 😢
@logigen
@logigen 4 ай бұрын
NOT ME
@leandrokapfer5859
@leandrokapfer5859 4 ай бұрын
@@logigen😂
@abdiwelihashi1475
@abdiwelihashi1475 4 ай бұрын
@@logigenI Second that😭
@rickymort135
@rickymort135 Ай бұрын
Me too, why we gotta change?
@AmitojSingh_2402
@AmitojSingh_2402 4 ай бұрын
I did not expect to get rickrolled by David J Malan in a CS50 lecure from Harvard 😭😭😭🙏🏻
@mickytananu5908
@mickytananu5908 5 ай бұрын
We're getting rickrolled 2nd time with this one 🗣🗣🗣🗣🔥🔥🔥🔥🔥🔥🔥🔥
@codereboot9765
@codereboot9765 3 ай бұрын
?? Second time?
@mickytananu5908
@mickytananu5908 3 ай бұрын
@@codereboot9765 There was a file that if you open in hex editor or smth you will see a link that send you to rick. I forgot to detail
@GosuNoKami
@GosuNoKami 3 ай бұрын
@@codereboot9765some of us switched from another video to this updated playlist
@NookStudios
@NookStudios 3 ай бұрын
@@codereboot9765probably from the lecture about html, Js, css.
@ryokudoom
@ryokudoom 6 ай бұрын
Can't believe i got rickrolled when rolling into my coding class
@freelance-writer
@freelance-writer 3 ай бұрын
"Phew! That was a lot." - David, before every break. 😆
@sefonefinpsefnpefn4191
@sefonefinpsefnpefn4191 10 ай бұрын
finally python 🎉❤
@aftertwentea
@aftertwentea 3 ай бұрын
Can't get enough of this intro.
@RealMoaaz
@RealMoaaz 4 ай бұрын
No way i got rick rolled at the end , amazing lecture , thank you cs50 :)
@certified.bibliophile
@certified.bibliophile 3 ай бұрын
This has to be one of the top rickrolls ever😂
@sosummer217
@sosummer217 4 ай бұрын
Fabulous professor, thanks!
@Dreadnought-142
@Dreadnought-142 3 ай бұрын
Imagine getting rickrolled by a professor + in 2024 + A course + by a qr code.
@symbolminded5167
@symbolminded5167 6 ай бұрын
Keep grinding boys
@altaygallagher
@altaygallagher 4 ай бұрын
this man is a legend
@programme371
@programme371 Ай бұрын
Are you for real professor??? You are scaring out new programmers!!! Dont throw buckets at them. Let them grasp the knowledge. Btw.. huge respect to you sir.
@seiitkhanotegali7734
@seiitkhanotegali7734 5 ай бұрын
YO CS50 we actually don't need to use sys to run exit. instead of sys.exit(1) we can just write exit(1) without the sys. 2:03:00
@sharanya005
@sharanya005 4 ай бұрын
Since we are importing the complete library we need to type sys.exit()
@KiraIsGod
@KiraIsGod Ай бұрын
@@sharanya005 no need to import the library to use exit()
@Dragon4526
@Dragon4526 Жыл бұрын
Another year, Another CS50
@zahidsayil9066
@zahidsayil9066 11 ай бұрын
love the energy
@SyariefAzman
@SyariefAzman Ай бұрын
im so getting used to the for loop and writing datatype . this is so new to me 😅
@fayzullohkarimov48
@fayzullohkarimov48 6 ай бұрын
Like if you never skip intro mucis
@legocis
@legocis 10 ай бұрын
Дякую! 🙂
@jiffy5210
@jiffy5210 6 ай бұрын
the ending was great !!
@itslonewolf742
@itslonewolf742 3 ай бұрын
Java mentioned. Let's go!!
@hgamerz1238
@hgamerz1238 5 ай бұрын
I knew it at the last I was having a feeling great ending
@220SouthlandAve
@220SouthlandAve 3 ай бұрын
You made it past week five ‐ give yourself a pat on the back (maybe two)!!!
@javanatto
@javanatto 11 ай бұрын
Oh, my! We've got rickrolled...again. what a perfect ending for a lecture, that's the perfect description XD
@chinmayachidrewar8856
@chinmayachidrewar8856 10 ай бұрын
you ruined it for me🥲
@wjjohns04able
@wjjohns04able 2 ай бұрын
At 1:53:47, does anybody know where “person” came from? I understand “people” but I didn’t catch how he pulled “person” out of that.
@sukhman._
@sukhman._ 2 ай бұрын
Are you saying in the for loop on line 9. If yes, it is the name of the variable. Like how in C we name data structures, node *n = this_and_that. person, here is just a variable he used inside the for loop. You could replace person with i or anything else, it will work same.
@shaadpatel20
@shaadpatel20 2 ай бұрын
it's the same as for x in people here x or "person" are temporary variables that holds a value of an element of people. for example: if name = John then person will be Carter, then the condition is checked, we know John is not Carter then person will be David, again the condition will be checked, we know this is false too then lastly person will be John, and we know that now, person = name, therefore finding the contact succesfully
@sukhman._
@sukhman._ 2 ай бұрын
What the loop is doing is, it is take the first pair of green curly brackets, assigning it to a variable named person. By doing this, keys(here, name and number) can used to access the value related with them(here, in first green bracket, carter and that long number.
@Mustafa_Tahaha
@Mustafa_Tahaha Жыл бұрын
Struggling through C to reach the holy grail that is Python!
@radman999
@radman999 11 ай бұрын
Would be better off sticking with C and C++ instead of a bloatware script language that anyone's mom can do
@MidnightV6
@MidnightV6 11 ай бұрын
@@radman999how many years have you been coding?
@Rayer24
@Rayer24 11 ай бұрын
@@radman999
@asadelh.28
@asadelh.28 11 ай бұрын
​@@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
@cachaça_baby
@cachaça_baby 11 ай бұрын
Monty PYTHON
@Reeta-i9z
@Reeta-i9z 2 ай бұрын
David sir, what did you code in your bridge.bmp program ?
@hasirash6786
@hasirash6786 10 ай бұрын
Ending was so funny lol
@ruizasri
@ruizasri 6 ай бұрын
Can't believe I got rickrolled in 2024 😆touche CS50
@GoldGlory7745
@GoldGlory7745 3 ай бұрын
I have a question to ask you. I am still learning as a beginner. So, I would like to ask you a question, in the real world require have to use VS code once they land a job as role as such a software engineer, computer programmer Data Science, or AI engineer? Let me know. Thank you!
@eleos11
@eleos11 8 ай бұрын
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?
@100drips
@100drips 5 ай бұрын
all that memory management just began to make fun 😅
@Samikshagupta425
@Samikshagupta425 19 күн бұрын
But why my speller file not work as malan how can i set up for dictionary and where I can get even my bridge bmp image is not open what can i do that's why I can't able to run my dictionary.py and edge.py can anyone give me what the solution of my hurdle
@harshpareta-o6o
@harshpareta-o6o 2 ай бұрын
Thanks
@ЪыъЪуъ-ф2ж
@ЪыъЪуъ-ф2ж 5 ай бұрын
I only started to appreciate python after I started learning C
@algirdasltu1389
@algirdasltu1389 Ай бұрын
Same
@algorhythms11
@algorhythms11 5 ай бұрын
No way he rickrolled all the students
@willperry1147
@willperry1147 7 ай бұрын
Blessed thank you
@zsunnder2355
@zsunnder2355 6 ай бұрын
Best Ending🤣🤣
@tiagoantonio2343
@tiagoantonio2343 6 ай бұрын
I LOVE PYTHON
@bimbom9712
@bimbom9712 4 ай бұрын
saw that ending from a mile away lmfaooooooooo
@rouassayah
@rouassayah 8 күн бұрын
Good
@spodi4real
@spodi4real 11 ай бұрын
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!!
@wonkanese
@wonkanese 11 ай бұрын
I can feel David Malan's energy
@Jonathanmillspatrick
@Jonathanmillspatrick 7 ай бұрын
Is there a rationale for the extra spacing, two blank lines, between code?
@brandy9725
@brandy9725 7 ай бұрын
David explains at 1:27:08 that it's a convention to help make functions stand out
@姚景曦
@姚景曦 5 ай бұрын
Is there any difference between the cs50x_WEEK6 python course and the cs50p course???
@divya_25_06
@divya_25_06 3 ай бұрын
Cs50 p is specifically for python ❤
@AnasKhan-pg5dc
@AnasKhan-pg5dc 4 ай бұрын
wow, he just rickrolled everyone🤣🤣🤣
@bx7gamer
@bx7gamer 9 ай бұрын
Can someone please list all the modules (pip) installed during the course! ,thanks in advance
@aopen130
@aopen130 9 ай бұрын
`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`
@이이이-g4f2y
@이이이-g4f2y 6 ай бұрын
The dictionary part is a littlebit tough haha.. there are crazy syntax like what he said
@d.k.1545
@d.k.1545 11 ай бұрын
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 11 ай бұрын
or does he just use person instead of the generic n variable like _ ?
@VijayGandhinagar
@VijayGandhinagar 11 ай бұрын
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 11 ай бұрын
@@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 11 ай бұрын
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 11 ай бұрын
@@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.
@ShahbazG
@ShahbazG 7 ай бұрын
problem set? 🤔
@hsglator7135
@hsglator7135 5 ай бұрын
Hey guys, while watching this lecture, I just realized that there are problem sets that need to be done. And The problem is that I don't have access to a computer or laptop to complete them. I was wondering if anyone knows a way to do them using a mobile ? If you know, please guide me.
@Zangetsu-gaTensho
@Zangetsu-gaTensho 5 ай бұрын
There was a compiler I used on android You can search up c compiler My problem is... Where are those problem sets? Can you help me
@karateuma
@karateuma 5 ай бұрын
​@@Zangetsu-gaTenshoneed to access from website where the whole course is available
@Aditya-pk8qv
@Aditya-pk8qv 3 ай бұрын
01:05:00
@boks02_
@boks02_ 9 ай бұрын
malloc(); is GONE 🗿free(); is GONE🗿*pointers are GONE🗿
@harisuresh2507
@harisuresh2507 8 ай бұрын
im sold on python rn
@FCAlex07
@FCAlex07 5 ай бұрын
We got rickrolled by Harvard University before GTA 6
@KamalVerse
@KamalVerse Ай бұрын
The rickrolls never gonna give up on us😂
@maianhvk
@maianhvk Ай бұрын
Whew, this is a breeze compared to the previous 2 weeks.
@kitgary
@kitgary Жыл бұрын
Can we have a CS50 lesson teaching how to crack the programming interview?
@arik2492
@arik2492 4 ай бұрын
We really did get a David J Malan rickroll before Gta 6
@georgimmitev
@georgimmitev 6 ай бұрын
1:15:24
@Serhii007
@Serhii007 Жыл бұрын
Дякую!
@airkh.
@airkh. 9 ай бұрын
the rickroll at the end lmaoo
@kenyhu4759
@kenyhu4759 9 ай бұрын
Good day
@Zangetsu-gaTensho
@Zangetsu-gaTensho 5 ай бұрын
Damn this one has lost me I need to look up the weekly problem sets, cuz this feels like I am missing alot 😅
@randomenia
@randomenia 10 ай бұрын
I don't speak english I'm watching whit Subtitule I have 16 years old You're The Best sorry for error
@vincentkosmol9679
@vincentkosmol9679 2 ай бұрын
2:04:00 Ahmm
@krish-ut9de
@krish-ut9de 2 ай бұрын
48:26
@garrickmahochmannph
@garrickmahochmannph 8 ай бұрын
Greatest rickroll 2024
@jonnysegway7866
@jonnysegway7866 Ай бұрын
I've been Rick Rolled! haha
CS50x 2024 - Artificial Intelligence
55:57
CS50
Рет қаралды 188 М.
CS50x 2024 - Lecture 5 - Data Structures
2:02:49
CS50
Рет қаралды 439 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
How I Would Learn Python FAST in 2024 (if I could start over)
12:19
Thu Vu data analytics
Рет қаралды 639 М.
If I start learning code in 2025, I’d do this.
4:48
Will Yi
Рет қаралды 29 М.
CS50 Fall 2024 - Lecture 6 - Python (live, unedited)
2:47:22
*Next-door 10x Software Engineer* [FULL]
4:50
Programmers are also human
Рет қаралды 859 М.
CS50x 2024 - Lecture 7 - SQL
2:14:05
CS50
Рет қаралды 537 М.
Why Most Self-Taught Developers Never Land The Job
7:28
Travis Media
Рет қаралды 160 М.
Devin just came to take your software job… will code for $8/hr
5:13