It's always great to refresh some concepts like classes, lambda functions and decorators. Thanks Brian and the CS50W's team!
@cje88873 жыл бұрын
Great lecture! I was already somewhat familiar with Python, but Brian's explanations of decorators and lambda functions really helped me understand them better
@blabla-kk8bl3 жыл бұрын
you never need them.just making more complex. simple is better than complex.
@stacy37814 ай бұрын
Brian's presentation was so engaging and clear that 1 hour flew by so fast!
@compilerrun55163 жыл бұрын
Man your typing speed 🔥.
@christoffer6527 Жыл бұрын
The coding software has autocomplete
@IXITHELEGEND Жыл бұрын
Looks even quicker at 2x speed
@mo.G_202011 ай бұрын
@@christoffer6527nope, he can touchtype fluently
@alexrubio95077 ай бұрын
of course it does, but he doesn't use autocomplete all the time, and even if he did, STILL...the typing process speed is purely amazing, you can't deny that.@@christoffer6527
@kaustubhkadam10835 ай бұрын
he also uses vim motions in vscode
@joseignacioyanez572 Жыл бұрын
Brian, thanks for being such a great Teacher! I've seen other videos on decorators and it seemed so difficutl to understand, but in a couple of minuts you explained it and made it look so easy and clear, I was smiling haha. Thanks to you, David and all the team!
@sayori39392 жыл бұрын
It's interesting the fact that throughout the 4 cs50 courses we see python used in different perspectives
@smileorcry720425 күн бұрын
Python is in everything now😅
@sayori39399 күн бұрын
@@smileorcry7204 if you use linux python will end up installed on your system no matter what, it's like baidu but actually useful
@anuradhamangalpalli27749 ай бұрын
Thank you, Brian. This is the first time I understood python fundamentals.
@kavya01023 жыл бұрын
Very succinctly but clearly explained. A good refresher for Python. Thanks!
@thomastan99012 жыл бұрын
You are an excellent lecturer. No text book is needed
@MrRynRules Жыл бұрын
Great lecture! Learned a lot even hough i have been coding python for the last 2 years
@PeterBohai4 жыл бұрын
Loving the Harry Potter references. Great lecture as always!
@shrikantdhayje34903 жыл бұрын
finally got a tutorial which also explains the compiler errors also. thank you so much! Great lecture
@zerodivided36764 жыл бұрын
Take a shot whenever Brian says ' for example' :) Nice and fast python introduction though.
@Komikkopeksevdalisi Жыл бұрын
Gerçekten harika çok kısa bir sürede bütün önemli olan bilgileri veriyor. Keşke programlamaya ilk başladığımda bu eğitimi izleseydim, diğer eğitimler uzun ve gereksiz bilgileri verirken en önemli olanları vermiyorlar.
@d0tjs7 ай бұрын
has been a great refresher on python
@kenmwendwa1882 Жыл бұрын
I loved the object orientated programming and decorator explanation
@facts68244 жыл бұрын
haward University admission via youtube....superb no assignment no submission
@aryansharma47754 жыл бұрын
you can find assignment notes and project at edx for free
@lishichan33653 жыл бұрын
The actual course is on edx these are just lectures
@LEVIACKERMAN-mg4cp3 жыл бұрын
@@lishichan3365 isn't this lecture not enough?? Or the course is much helpful? I mean if I didn't enrol to the course will i miss any lectures on there that is not available on youtube?
@sayori39392 жыл бұрын
@@LEVIACKERMAN-mg4cp you'll miss the problem sets which are the 2nd most important things in this course and you won't get havard's free certificate (NOT THE EDX ONE)
@Wawazi4 жыл бұрын
Never imagined Harry potter would be pivotal to my learning
@adforknowledge65824 жыл бұрын
:P :D Me too was shocked to see it and loved it a lot... That too , Brian is like superb awesome person he kept his face blank just looked at the audience for 1 sec from the corner of the eye and started typing Harry , Harmoine ha ha ha .. That was super awesome moment .. I started smiling .... :P :)
@Wawazi4 жыл бұрын
@@adforknowledge6582 I doubt if anyone didn't smile at that moment. Completely epic stuff!!!
@thiagobarso2 жыл бұрын
😹
@meruem6995ujjoooo2 жыл бұрын
Yer a coder Phillip
@Hackonomics Жыл бұрын
Love you Brian brother!😍 You're clear my all concepts!
@northstarcode86754 жыл бұрын
Yer a wizard Brian
@taofeekajibade3 жыл бұрын
Quite brilliant presentation. Many thanks, Brian.
@Ldmp8073 жыл бұрын
Best way to explain decorators!
@CW7113 жыл бұрын
Brian is awesome.
@covingtonkua94042 жыл бұрын
This video alone just thought me an entire sem worth of python
@kingcogles3 жыл бұрын
After Project 1 and 2 which is Python/Django related, I need to say reading the Django docs is like getting lost in a forest. But still lovin' the fact that it is a very, very powerfull framework.
@blazi_03 жыл бұрын
Yea ,the documentation is worst ! It's like they wrote this documentation to make you feel that you don't know Python 🤣
@kingcogles3 жыл бұрын
@@blazi_0 Yeah like that. I even had like 5+ tabs just of Django's docs to be able to find quickly what it might be helpful to me and most of the time for nothing. Now I started to work on Project 4 ... and you guessed it, Django has to be used. Suddenly "The sound of silence" played in my brain. 😭
@shrikantdhayje34903 жыл бұрын
agreed
@sayori39392 жыл бұрын
At this rate you're better off searching specific topics in random websites on google. You just need the right keywords
@nawafEalharbi2 жыл бұрын
As a person who learned python before This is a really fast course about python, lets called it introduction to python is better.
@christian37ism2 жыл бұрын
The object oriented teaching was helpful, thank you.
@MuhammadAbbasYousafzai2 жыл бұрын
Thanks Brian
@shubhammandal67353 жыл бұрын
Python Classes Code: class Flight: def __init__(self, capacity): self.capacity = capacity self.passengers = [] def add_passengers(self, name): if not self.open_seats(): return False self.passengers.append(name) return True def open_seats(self): return (self.capacity - len(self.passengers)) flight = Flight(3) people = ['Harry', 'Ron', 'Hermione','Genny'] for person in people: success = flight.add_passengers(person) if success: print(f'{person} is added to the Flight') else: print(f'No, Available seats for {person}')
@galofloresc2 жыл бұрын
I have the same code but when trying to run it an error says that Flight takes no arguments. any help
@sukhmanpreetsingh15252 жыл бұрын
can you paste your code here?
@trident7996 Жыл бұрын
import random class Flight: def __init__(self, capacity): self.capacity = capacity self.passengers = [] def add_passengers(self, name): if not self.open_seats(): return False self.passengers.append(name) return True def open_seats(self): return (self.capacity - len(self.passengers)) flight = Flight(3) people = ["Harry", "Ron", "Hermione","Genny"] random.shuffle(people) for person in people: success = flight.add_passengers(person) if success: print(f"{person} is added to the Flight") else: print(f'No, Available seats for {person}')
@trident7996 Жыл бұрын
justice for genny!!!
@zaharaddeenkaramilawal49943 жыл бұрын
What a wonderful presentation
@bleulejour2 жыл бұрын
Thanks Brian, simply brilliant!
@koushik34152 жыл бұрын
Simple and Elegant ! 💕💕💕💕💕💕💕💕
@abdullahgumel39363 жыл бұрын
Our teachers told us not to use the word innit in school, now I'm level 9000 programmer I use innit when I want
@TranNguyen-mv6ln3 жыл бұрын
Thank you so much
@innocence31584 жыл бұрын
Brian at the start: So this is an integer Also Brian (close to an end): this is too much of an abstraction
@Mapleaph2 жыл бұрын
Best tut ever
@mrgomezs3 жыл бұрын
thank you
@bimalakumari2432 жыл бұрын
Tank you for your efforts
@hychembek3 жыл бұрын
thanks
@claudiamanta19437 ай бұрын
Thank you 😊
@josemariarodriguez7845 Жыл бұрын
52:42 Brian combines flight, which is a variable from Class Flight , and add_passenger, which is a method from the class Flight: flight.add_passenger(person). It is pretty clear that both combined, flight and add_passenger, have the ability of looping the list people, and add the person to the flight, if the capacity is not zero. But please can anyone provide some additional abstract to this mechanism, how's called, how's work (some_variable.some_method(some_other_variable)?
@finobialfaceoff7260 Жыл бұрын
Thank you sir !
@ridayasin7946 Жыл бұрын
Incredible
@emilsjoblom2734 ай бұрын
This is the entire cs50p course in one video..
@bakeelalnhmee17763 жыл бұрын
Great lecture, greater lecturer
@aljosja3353 Жыл бұрын
Thanks you!
@ranjanasaiyam58346 ай бұрын
He is genius,i feel and see it
@johnpill1 Жыл бұрын
I finally get what SwiftUI property wrappers are after using them for months thanks to the last section of this as I guess this is essentially what they are?
@shahbazmuhammad81832 жыл бұрын
import functions for i in range(10): print(f"The square of {i} is {square(i)}")
@jamaka_me_code7962 жыл бұрын
With your syntax as is, it should be functions.square(i) inside the curly brace 👍 or change import to -> from functions import square
@sayori39392 жыл бұрын
What the hell is that "functions" module Oh i get it ._. You can import a module with an alias: "import functions as f" careful not to name it the same name as another module you're using
@mon0theist_tv Жыл бұрын
I think I'd rather just write a function instead of using lambda lol but Brian's explanation is the only one I've seen that kinda sorta makes sense
@RomarioKurti287 ай бұрын
In the lambda example he defined a function 'f' that takes a person as an input and returns that person's name. After that he assigns the return value of that function 'f' to the 'key' attribute of the sort function. What i don't understand is how is the person passed as an input to the 'f' function during the sort execution! Thanks fo the help 😊
@eltinahutahaean75920 күн бұрын
It has to do with the sort method of list. Parameter key will apply a function given to it to each of the list items ``` Help on built-in function sort: sort(*, key=None, reverse=False) method of builtins.list instance Sort the list in ascending order and return None. The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained). If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values. The reverse flag can be set to sort in descending order. ```
@sencode5893 жыл бұрын
Very clear and interesting! thanks!
@_rachid4 жыл бұрын
Cool! Thanks.
@malithsenanayakentgl-10523 жыл бұрын
Excellent lecture. Thanks...
@Duge61243 жыл бұрын
is the wrapper function 57:00 really necessary. Can we not just write line 3-5 inside announce?
@yuna_tseng3 жыл бұрын
haha I have an exactly same question here too, i use js to reproduce the situation without the wrapper function, and it works. but i think the wrapper function here brings the more powerful function like closure`s effect
@sayori39392 жыл бұрын
But then how would return all of that? If you tried to return "announce" it would ask for an argument and it would get a recursion error
@gromit98264 ай бұрын
32:21 this type of code doesn't seem to work anymore, it just gives me a syntax error (Python 3.12.4 64-bit)
@isha73725 ай бұрын
Problem sets for week 0,1,2 are same I have submitted with all specifications for week 0 do i need to submit again or just skip ?
@smileorcry720425 күн бұрын
Where to find problem sets.there are only projects in cs50w course .
@patrickb69383 жыл бұрын
Just awesome!
@KeyserTheRedBeard2 жыл бұрын
fantastic upload CS50. I killed the thumbs up on your video. Maintain up the wonderful work.
@bangtanffarmy Жыл бұрын
6:53 the code shows an error in the terminal after I put xyz name in input (terminal), it says NameError: name 'xyz' is not defined
@lautar4 жыл бұрын
No available sits for Ginny :(((((((((
@shazkingdom17024 жыл бұрын
😀😀😀
@dmytrosoroka73353 жыл бұрын
Thanks from Ukraine!
@kimjongun38902 жыл бұрын
🧐
@sayori39392 жыл бұрын
:(
@-leovinci3 жыл бұрын
When can we introduce Common Lisp...
@niyomungelialine68402 жыл бұрын
what edit are you using
@Dr.Javaidqureshi Жыл бұрын
Pl suggest solution. both files are in the same folder PS C:\javaid\Python\Lecture1> python squares.pi Traceback (most recent call last): File "C:\javaid\Python\Lecture1\squares.pi", line 1, in import functions ModuleNotFoundError: No module named 'functions' PS C:\javaid\Python\Lecture1>
@zizou5638 Жыл бұрын
bro the file extension is wrong it should be .py not .pi
@jaafarhammoud75073 жыл бұрын
how to remove the background behind him when record coding?
@sayori39392 жыл бұрын
Honestly i would like to know too
@chiraglal49383 жыл бұрын
How are you opening that terminal dialogue box?. I'm using windows btw.
@blazi_03 жыл бұрын
He is using Mac
@sayori39392 жыл бұрын
What do you mean by terminal dialogue? :0 you can execute "cmd.exe" in windows and execute your python programs there (if you have it installed properly)
@ivankoh37793 жыл бұрын
Why are we relearning python? Isn't this alrd in CS50?
@animeshdas68663 жыл бұрын
This one is more focused on web development.
@shahbazmuhammad81832 жыл бұрын
def square(x): return x * x
@sayori39392 жыл бұрын
Those decorators are so confusing '~'
@hizkiapermata52063 жыл бұрын
Finally
@admasuchane24023 жыл бұрын
can we develop a web application for multilevel marketing(MLM) using python????????????
@codegoblin7740 Жыл бұрын
nah you need assembly for that.
@divyanshjainbhajan4 жыл бұрын
What's that application in which he runs is program? One with the black background.
@green--apple4 жыл бұрын
That's the Terminal. Every computer has one.
@divyanshjainbhajan4 жыл бұрын
@@green--apple like command prompt?
@AmitTiwari-wf1xj4 жыл бұрын
@@divyanshjainbhajan yes
@csgundee4 жыл бұрын
You can use VS code terminal instead of the black one.
@bvedantcodes4 жыл бұрын
@@divyanshjainbhajan Command Prompt is exclusive to Windows. I'd recommend installing Bash via Git Bash or Windows Subsystem for Linux-- the commands here are shared with the command line in macOS and Linux operating systems
@jayanthbharadwaj20413 жыл бұрын
Where can i next best course on Python!!..thanx for the introductive course 😊
@JT-iv8nd3 жыл бұрын
5:59 If input does not work try raw_input
@sayori39392 жыл бұрын
If input is not working you probably don't have python set up properly or have some sketchy python interpreter/library
@sherxon12173 жыл бұрын
that is good 👍👍👍👍👍👍👍👍👍
@v.calipso76872 жыл бұрын
senk you
@jjjjjly Жыл бұрын
I missed the animation some professors made to help us to understand Pointer in cs50x. Decorators are honestly little hard for me.
@justinbieber96564 жыл бұрын
Is this lecture content any different from CS50s week 7 Python lectures?
@jakubpietrzak704 жыл бұрын
Yes, you can look it up in video description
@Itinerant_Indian3 жыл бұрын
Not so much
@sayori39392 жыл бұрын
Dude cs50x python lecture was a true killer, it taught me more than a whole course, maybe because i was fresh with C but man that was awesome
@joseignacioyanez572 Жыл бұрын
Yes, especially the second half, OOP and Functional Programming, such a great explanation
@harshalsonawane88792 жыл бұрын
Which compiler he is using
@kimjongun38902 жыл бұрын
vs code
@sayori39392 жыл бұрын
There are no compilers :0
@mohammadshoaib58814 жыл бұрын
When the projects will be available?
@kingcogles3 жыл бұрын
They are available on Edx for free, so hurry up, last date for submission of all projects is December 31 this year.
@mohammadshoaib58814 жыл бұрын
When will the projects be availabe for cs50 web programming 2020?
@gabemvp4 жыл бұрын
The new projects will be available on July 1st, as published on the course webpage on edX.
@ruleoflawedutainment3 жыл бұрын
Under the flight example, I get error message which says flight = Flight (3) TypeError: Flight() takes no arguments. Any help please...
@icy10183 жыл бұрын
In your __init__, you probably just have __init__(self). In the case where it’s __init__(self), you would reference it by flight = Flight() but instead you provide a parameter. You would need __init__(self, capacity) to reference it like flight = Flight(3)
@galofloresc2 жыл бұрын
@@icy1018 I have the same issue but I double checked and it says _init_(self, capacity): still showing the TypeError that takes no arguments. any help?
@icy10182 жыл бұрын
@@galofloresc double underscore for the init!
@galofloresc2 жыл бұрын
@@icy1018 totally missed that, thanks!
@boluomiable4 жыл бұрын
i was watching the old (2018) one in June, so the update of July will not have flask?
@bvedantcodes4 жыл бұрын
Yeah, they're going with Django instead
@boluomiable4 жыл бұрын
@@bvedantcodes thx
@bvedantcodes4 жыл бұрын
Anyone know what vscode theme he's using?
@lukealadeen7836 Жыл бұрын
Not vscode it's cs50 ide
@bvedantcodes Жыл бұрын
@@lukealadeen7836 😂
@wanglan42553 жыл бұрын
more like a show
@sanchitjaiswal29792 жыл бұрын
poor Ginny, she got left out
@nataliehill58993 жыл бұрын
54:52 decorator
@tams805 Жыл бұрын
If anyone is trying to set up Notepad++ on Windows for this, then aipython has a good video called "Python and Notepad++ | Running python code from Notepad++ | Python Tips 2". Python 3.11 is probably installed in "username > AppData > Programs".
@mrgomezs3 жыл бұрын
apologetic declaration against intelligencers
@shrikantdhayje34903 жыл бұрын
what!
@mrgomezs3 жыл бұрын
outwitting the devil
@mrgomezs3 жыл бұрын
read
@sayori39392 жыл бұрын
what!
@parulgupta5724 жыл бұрын
Hi, for what is 'f' used in python?
@freelanceprogrammer95374 жыл бұрын
format
@rahulanand60153 жыл бұрын
i was wondering about the same thing as well
@icy10183 жыл бұрын
@@rahulanand6015 it’s called an f string which is just easy to use. The old way to format a string was: name = “Billy” print(“Hello %s” %name) That would print Hello Billy but it can get confusing really fast. There is also the .format shown below: name = “Billy” print(“Hello {}”.format(name)) .format also is old and can get confusing since you may have many entries in the .format and it will take time to see which parameter goes where. Nowadays, the f string is used. Example: name = “Billy” print(f”Hello {name}”) You can probably see how useful that can be and clean it looks. Definitely helps readability. Hope that helps
@rahulanand60153 жыл бұрын
@@icy1018 thanks a lot mate its really a great explanation
@icy10183 жыл бұрын
@@rahulanand6015 Glad it helped
@miquelstrippoli22864 жыл бұрын
Python is like Java but much more easy
@nawafEalharbi2 жыл бұрын
Every thing in Python so easy until we come to OO 🙂.
@excelvbaselftaught8892 жыл бұрын
If you don't know any other language, then Python is very easy because it's extremely logical, as a human might think. However, if you are coming from a language like C, JavaScript, or Java, it's actually more difficult to pick up Python initially because you have to "unlearn". Parentheses (), square brackets [], and squiggly brackets {} mean something totally different. OO is a set of paradigms that, once learned, port relatively easily. C does not support objects natively.
@andiuptown17116 ай бұрын
@@excelvbaselftaught889*Actually, it’s quite easy. Things like brackets and semicolons are so trivial lol*
@parulgupta5724 жыл бұрын
46:45 I didn;t understand what point is !!! and what is ' IN__IT"
@freelanceprogrammer95374 жыл бұрын
__init__ function initializer, theory say... called a constructor, or initializer, and is automatically called when you create a new instance of a class
@sayori39392 жыл бұрын
You butchered that word lol
@SoupsIsNicer2 жыл бұрын
Think
@fabioaugusto98663 жыл бұрын
tem em PT BR?
@sayori39392 жыл бұрын
Infelizmente nao :/ mas pesquisa, de repente tem alguma versao legendada
@Ryokans Жыл бұрын
Brian is so mature, but he has a babyface... hard to tell how old he is 🤔
@brunomattesco Жыл бұрын
he's thirteen
@DesazMusicYt Жыл бұрын
Second part of video...I understood NOTHING
@rohankumarcl88523 жыл бұрын
Excellent lecture. But it would be better if you explained while loop.
@desianaginting3741 Жыл бұрын
I'm new in Phyton. Where i can download Phyton for free? Which text editor i can use for phyton?