No video

Python - CS50 Shorts

  Рет қаралды 132,913

CS50

CS50

Күн бұрын

***
This is CS50, Harvard University's introduction to the intellectual enterprises of computer science and the art of programming.
***
HOW TO SUBSCRIBE
www.youtube.com...
HOW TO TAKE CS50
edX: cs50.edx.org/
Harvard Extension School: cs50.harvard.e...
Harvard Summer School: cs50.harvard.e...
OpenCourseWare: cs50.harvard.e...
HOW TO JOIN CS50 COMMUNITIES
Discord: / discord
Ed: cs50.harvard.e...
Facebook Group: / cs50
Faceboook Page: / cs50
GitHub: github.com/cs50
Gitter: gitter.im/cs50/x
Instagram: / cs50
LinkedIn Group: / 7437240
LinkedIn Page: / cs50
Reddit: / cs50
Quora: www.quora.com/...
Slack: cs50.edx.org/s...
Snapchat: / cs50
Twitter: / cs50
KZfaq: / cs50
HOW TO FOLLOW DAVID J. MALAN
Facebook: / dmalan
GitHub: github.com/dmalan
Instagram: / davidjmalan
LinkedIn: / malan
Quora: www.quora.com/...
Twitter: / davidjmalan
***
CS50 SHOP
cs50.harvardsh...
***
LICENSE
CC BY-NC-SA 4.0
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
creativecommon...
David J. Malan
cs.harvard.edu...
malan@harvard.edu

Пікірлер: 82
@chrisoaus5328
@chrisoaus5328 4 жыл бұрын
Python Syntax Overview - 2:16 Variables - 2:44 Conditionals - 4:14 Loops - 7:50 Arrays/Lists - 10:19 Tuples - 14:44 Dictionaries - 18:46 Printing and Variable Interpolation - 24:25 Functions - 25:20 Objects - 27:37 Style - 35:15 Including Files - 36:28
@xrafter
@xrafter 4 жыл бұрын
I thought it called importing?
@gasparzuker
@gasparzuker 3 жыл бұрын
@robotnixon3453
@robotnixon3453 4 жыл бұрын
Doug is such an oddly charismatic guy.
@joseville
@joseville 4 жыл бұрын
Update to code at 16:53: now you can use f-strings too: print(f"In {year}, {prez} took office.")
@reedcolloton4893
@reedcolloton4893 3 жыл бұрын
they really should update it- the lecture uses f-strings too
@vinayjangra1401
@vinayjangra1401 3 жыл бұрын
Yessssssssssss
@ritaahmed989
@ritaahmed989 Жыл бұрын
thank you! very helpful
@andyalberts6621
@andyalberts6621 Жыл бұрын
I always look forward to Dougie Fresh's shorts vids. David is a raging madman, slinging information at top speed. Dougie pulls it all in and makes it more digestible (No shade to David, the whole team is a great combo)
@rautermann
@rautermann 4 жыл бұрын
2019 UPDATE: Dictionaries entries stay in the order you created them - in CURRENT VERSIONS of Python (3.7 and above)! And for all of us who got so used to explicitly declaring variable and return types: It's worth mentioning that using types explicitly is possible now in Python (through special syntax) and I feel it's becoming more common at the moment! It is totally optional, but it can be useful to avoid errors from wrong types!
@danivanon
@danivanon Жыл бұрын
Doug lost the order at @22.18, when he wasn't even using the .items() method, which is weird.
@yash1152
@yash1152 Жыл бұрын
thanks for sharing explicit type declaration in python. yes, i am an admiror of properly typed code.
@Triskelion345
@Triskelion345 Жыл бұрын
holly hell
@nervous711
@nervous711 3 жыл бұрын
It's somehow uncomfortable when seeing variable type not initialised......
@coldfire6869
@coldfire6869 Жыл бұрын
It'll take some time for me to get used to it. Feels really strange.
@scaramouche7759
@scaramouche7759 9 ай бұрын
Yea it just felt normal telling the computer, like hey I need a variable of this type, so use up 32-bits. Now it’s kind of like, talking to computer in incomplete sentences lol.
@SeyidAr
@SeyidAr 11 ай бұрын
For some reason i like C more than Python. I really enjoyed the first 5 weeks actually.
@phonixMAM
@phonixMAM 5 ай бұрын
stockholm syndrome
@pyb.5672
@pyb.5672 6 жыл бұрын
Hi, just a quick note on the fact that using "id" as a parameter variable in the object is not ideal as id() is actually a built in function in Python. Using "id_" or "iden" or whatever will resolve the issue that most students will encounter when trying to print jane.id.
@dennistravelriffs
@dennistravelriffs 4 жыл бұрын
"Shorts"
@TheRamstoss
@TheRamstoss 4 жыл бұрын
He is still the shorts guy
@hellothere2407
@hellothere2407 3 жыл бұрын
I'd hate to see the longs :')
@FrankoAli
@FrankoAli 3 жыл бұрын
😂😂👌
@bluebird563
@bluebird563 5 жыл бұрын
best python crash course on youtube
@utilizator500
@utilizator500 3 жыл бұрын
This really needs to be updated
@sungvin
@sungvin Жыл бұрын
That explanation with __init__ has finally cleared all of my previous questions, such a nice entry to the OOP
@arunkumaralagarsamy716
@arunkumaralagarsamy716 3 жыл бұрын
this syntax is simple for 16:58 print(f"In {year}, {pres} took office")
@qixiangwong5849
@qixiangwong5849 3 жыл бұрын
Like most of your intro videos, except the OOP explanation in this one. If someone doesn't know OOP from other language, your explanation in this one probably just exploded their heads
@femtoapple
@femtoapple 4 жыл бұрын
perfect python crash course. thanks Doug!
@mon0theist_tv
@mon0theist_tv Жыл бұрын
16:19 how does the code/computer/interpreter/whatever know what "prez" and "year" is? How does it know to correspond to the tuple values?
@ElTopDev
@ElTopDev Жыл бұрын
I guess by this moment you should know it (5 months later hehehe) but yeah, for other ppl who may be wondering. It's because of the order of the parameters in the for in declaration: for prez, year in presidents.values()
@johnnyklash5883
@johnnyklash5883 Жыл бұрын
@@ElTopDev Thank you so much for that, I came to youtube comments for that reason.
@gamingbeasts7480
@gamingbeasts7480 6 жыл бұрын
Doug you are awesome...incredibly awesome..
@scaramouche7759
@scaramouche7759 9 ай бұрын
Python looks like a paragraph that is missing periods between sentences at first glance lol. I got used to brackets and curly braces.
@DogginsFroggins
@DogginsFroggins 2 жыл бұрын
Pythons greatest asset is its coolness C - a literal letter, lame Java - Coffee is boring Java Script - Cooler because script sounds leet Assembly - Reminds me of highschool. Python - An actual snake Python is the winner
@MoolsDogTwoOfficial
@MoolsDogTwoOfficial 4 ай бұрын
Since I coded a lot in Python since 2019 to 2023, this week will be a breeze.
@albertcedeno
@albertcedeno 6 жыл бұрын
Teach me how to "dougie."
@user-dz8me4sp8m
@user-dz8me4sp8m 2 ай бұрын
This 39-minute video, one of the most useful "shorts" in the world, calls itself a "shorts"
@b3an5j28
@b3an5j28 21 күн бұрын
22:55 Should be updated that Python 3.7 onwards dicts will preserve insert order. Maybe write it on the video's description, because it could potentially confuse future students.
@vinayjangra1401
@vinayjangra1401 3 жыл бұрын
Thanks Doug Lloyd Sir🙏🙏❤️
@fatadel
@fatadel 5 жыл бұрын
14:05 nums[len(nums):] = [5] Could anyone tell why the hell there is that colon after len(nums)?
@hugochiang6395
@hugochiang6395 5 жыл бұрын
It means from len(nums) onward
@bawwwdis232
@bawwwdis232 3 жыл бұрын
Dude was on jeopardy
@edprins1760
@edprins1760 3 жыл бұрын
I do not like the example withe the bool assignment. In C you would write: bool alphabetic = ( isalpha(var)); for the example bette choose a non boolean assignment.
@tjanderseon7838
@tjanderseon7838 4 жыл бұрын
26:37 is that code in the bottom right hand corner of the slide still necessary? all I have is def main(): at the top and main() at the bottom and I can use functions in any order
@IchiroSakamoto
@IchiroSakamoto 4 жыл бұрын
The line means if the python file is run directly, main() executes. If the file is imported into another file then main() doesn’t execute
@joseignacioyanez572
@joseignacioyanez572 3 жыл бұрын
@@IchiroSakamoto thanks
@rickydonne802
@rickydonne802 3 жыл бұрын
So by the time the video was recorded, Python was at 5th-6th but now it is at number 1. This shows how the world is getting close to more AI and data science. Now it's just a matter of time that C will become an advanced/Intermediate course instead of a beginner's. Python is more attractive and more forgiving. So I guess schools and everywhere people will be taught Python to get large number of people into programming.
@mon0theist_tv
@mon0theist_tv Жыл бұрын
Idk I kinda like that CS50 teaches C first, so you can see the lower-level way of doing things first, and then appreciate the ease of higher level languages
@dim4atij
@dim4atij 3 жыл бұрын
I thought the dictionary in Python3 is ordered - am I wrong? E.g., if it's defined as "cheese" then "pepperoni" then it will iterate in the same order.
@madwatcher1
@madwatcher1 3 жыл бұрын
It is guaranteed only in python 3.7+. So you're right and he was right too
@user-jo9my2pb8b
@user-jo9my2pb8b 4 ай бұрын
The tuples section is a little outdated
@yechen5615
@yechen5615 4 жыл бұрын
May I know why result = 0 for i in range(0, x): result += x return result print(square(5)) will come out 25? shouldn't it be 0+5+1+5+2+5+3+5+4+5? for loops is always my pain.
@CH3LS3A
@CH3LS3A 4 жыл бұрын
the for loop will iterate from the starting value (which you've set as 0) to the end value, which you've set as x. but in your code, you're just adding x to result, and you're not adding the for loop's iterator (the variable i). your for loop just adds 5 + result, 5 times, since that's the range dictated by range(0, x). if you want 0+5+1+5+2+5+3+5+4+5, try: for i in range(0, x): result += x result += i return result + 5
@yechen5615
@yechen5615 4 жыл бұрын
@@CH3LS3A Thank you very much. Now I got it.
@trovr
@trovr 4 жыл бұрын
in this part - 20:46 is this " if pizza["vegetables"] < 12 " wrong? isnt this way: "if pizzas[... " ?
@trovr
@trovr 4 жыл бұрын
@irina lyrics thanks! :)
@tristanJollyz
@tristanJollyz Ай бұрын
@@trovr i'm wonder why too, can you explain, seems like the other guy has deleted his comment
@ghostfjdgcsusvsgsj
@ghostfjdgcsusvsgsj 3 жыл бұрын
Thank you Doug
@jerrys.lawson5418
@jerrys.lawson5418 3 жыл бұрын
Thank you Doug ~ everything lol
@patrickmcauliffe7162
@patrickmcauliffe7162 4 жыл бұрын
you are the best doug!
@shahidulislamzahid5172
@shahidulislamzahid5172 2 жыл бұрын
thank you so much
@itspurelypassionate
@itspurelypassionate 3 жыл бұрын
Are python classes supposed to be on different page/file like java?
@ZakariaShahen
@ZakariaShahen 3 жыл бұрын
17:37 Error: n[len(n):] = 4 TypeError: can only assign an iterable
@merorus6680
@merorus6680 2 жыл бұрын
You shold put braces around 4
@solarenergynow08
@solarenergynow08 4 жыл бұрын
Are these slides available ?
@joshuagarber662
@joshuagarber662 3 ай бұрын
27:37 haha i see what you did there! 😜
@getsunova8894
@getsunova8894 Жыл бұрын
So.. is Tuples pronounced as too-ple or tup-ple.
@Lucky7th7450
@Lucky7th7450 6 ай бұрын
40 short minutes.
@BadalKumar-tu2wg
@BadalKumar-tu2wg 2 жыл бұрын
Good sir
@jeetshah8513
@jeetshah8513 4 жыл бұрын
Can I use selenium module???
@BoBo-yn4xf
@BoBo-yn4xf 2 жыл бұрын
Dec 7, 2021
@devmoldogazy
@devmoldogazy 4 жыл бұрын
Python 😍👍🏻👍🏻 How can I learn PYTHON easily, quickly and successfully? Can you tell me if you can?
@ns8928
@ns8928 4 жыл бұрын
Practice, Practice and Practice. Keep learning new things.
@armstrongtixid6873
@armstrongtixid6873 4 жыл бұрын
@@ns8928 Go to freeCodeCamp.org and search for their Python course for beginners by Mike Dane (Giraffe Academy). It's perfect.
@alialparslan2288
@alialparslan2288 2 жыл бұрын
25:30 aahhah Ditto
@chandrakantjena3431
@chandrakantjena3431 3 жыл бұрын
new thing about shell scripting - 37:55
@chrislam1341
@chrislam1341 4 жыл бұрын
shebang 37:55
@talhatariqyuluqatdis
@talhatariqyuluqatdis 6 жыл бұрын
1st
@albertcedeno
@albertcedeno 6 жыл бұрын
2nd
@albertcedeno
@albertcedeno 6 жыл бұрын
3rd
@albertcedeno
@albertcedeno 6 жыл бұрын
4th
Running "Hello World!" in 10 FORBIDDEN Programming Languages
18:07
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Violet Beauregarde Doll🫐
00:58
PIRANKA
Рет қаралды 25 МЛН
Gli occhiali da sole non mi hanno coperto! 😎
00:13
Senza Limiti
Рет қаралды 21 МЛН
Is Coding still worth it in 2024? (as an ex-Google programmer)
13:36
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 802 М.
Easy Google Coding Interview With Ben Awad
28:00
Clément Mihailescu
Рет қаралды 1 МЛН
10 Python Comprehensions You SHOULD Be Using
21:35
Tech With Tim
Рет қаралды 142 М.
Functional Programming in 40 Minutes • Russ Olsen • GOTO 2018
41:35
GOTO Conferences
Рет қаралды 810 М.
AI Expert Explains Future Programming Jobs… and Python
9:59
Travis Media
Рет қаралды 288 М.
Tries - CS50 Shorts
16:24
CS50
Рет қаралды 72 М.
Violet Beauregarde Doll🫐
00:58
PIRANKA
Рет қаралды 25 МЛН