While Loops in Python

  Рет қаралды 499,007

Khan Academy

Khan Academy

Күн бұрын

Пікірлер: 96
@dudermcgavin
@dudermcgavin Жыл бұрын
Man, I have been stuck in my assignment for 2 weeks! You explain python better than all of my tutors and teachers! I finally understand while loops because of you! Thank you so so so much!
@0208hihi
@0208hihi 13 жыл бұрын
Finally I get it, you are too good in explaining things in a simple yet exhaustive way. You are awesome!!
@anonymousdbl1788
@anonymousdbl1788 8 жыл бұрын
3:34 that moment when your teacher doesn't know what he just did
@fatmanlee7
@fatmanlee7 13 жыл бұрын
HOW IS THIS POSSIBLE?! Khan! I learned Chem from this channel 3 years ago in high school, and now I am in college learning programming off this channel again!
@domomort8396
@domomort8396 2 жыл бұрын
hi
@halaosman6210
@halaosman6210 7 ай бұрын
3:32 "What did I do? What is that thing?" Made me laugh so hard! 😂 Ur teachings r great, btw! At least better than my teachers anyway =D
@suhailabessa9901
@suhailabessa9901 Жыл бұрын
finally !! i understand the while loop... Thank you. youre awesom 💓
@Ricky-zc8qm
@Ricky-zc8qm 7 жыл бұрын
I like the while loops more than the for. For is shorter, but it seems less intuitive and harder to understand for someone who doesn't know what for does.
@movieswithmic193
@movieswithmic193 6 жыл бұрын
I have a midterm in two days, thank you sal. 🙏
@onthutemotlhabane5697
@onthutemotlhabane5697 Жыл бұрын
Mr Khan!! You are a Legend!!🙌🏾🙌🏾🫡🫡🫡
@Fullrusher
@Fullrusher 5 жыл бұрын
I was learning python and feeling confident until I got to loops lol advice ?
@AS-dr1cp
@AS-dr1cp 5 жыл бұрын
me too :(
@STAVO.33
@STAVO.33 8 ай бұрын
Same,please help
@Fullrusher
@Fullrusher 8 ай бұрын
@@STAVO.33 I gave up, Ai is here now who needs us ?
@sabiansmasher2000
@sabiansmasher2000 11 жыл бұрын
wow what dont u do Sal?
@gelerson1642
@gelerson1642 7 жыл бұрын
fail. Sal doesn't fail.
@SotosMoud
@SotosMoud 6 жыл бұрын
Came here to ask the exact same thing... This crazy guy...!
@Kev_Dog14
@Kev_Dog14 5 жыл бұрын
Seriously, I wonder what Sal actually finds difficult to understand.
@dezCnutsCSGO
@dezCnutsCSGO 4 жыл бұрын
this guy literally knows everything
@arjungopinath9923
@arjungopinath9923 3 жыл бұрын
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRS
@JenniferOpal
@JenniferOpal 6 жыл бұрын
Best. Breakdown. Ever!
@aHASDfawlkjfa
@aHASDfawlkjfa 12 жыл бұрын
you need more vids on this subject plz
@dittocto
@dittocto 3 жыл бұрын
Amazing ! 1 decade old video.
@c.p.royalboyshukriya
@c.p.royalboyshukriya Жыл бұрын
Thanks for explain it😊
@rafcairne6773
@rafcairne6773 2 жыл бұрын
This While loop is infinite. What is missing here? sum=0 i=0 while i
@jw7196
@jw7196 5 жыл бұрын
You can comment out multiple by using triple quotes. For example, indtead of: # This is an example of commenting # out mulple lines with triple quotes You would say: """This is an example of commenting out mulple lines with triple quotes"""
@dipu827
@dipu827 13 жыл бұрын
You are simply the best!!
@ayushmishra-on2cs
@ayushmishra-on2cs 9 жыл бұрын
Thanx once again.After science and maths....now computer u hv helped me lot.Btw hv u done any tutorial of. Java and C??
@mlittleprogramming780
@mlittleprogramming780 4 жыл бұрын
Great video!
@miyoo7999
@miyoo7999 3 жыл бұрын
More python vids pls :')
@hz2229
@hz2229 3 жыл бұрын
Yes same
@federicovazquez9011
@federicovazquez9011 5 жыл бұрын
So while loops are there to go from 0 to whatever is less then? For example if the while loop were to say while i is less than 20, then it would add the sum up all the way to 19?
@leohong5513
@leohong5513 2 жыл бұрын
I thought coding was easy until I learned python! lmao
@vanhalenmk
@vanhalenmk 13 жыл бұрын
For commenting out areas at 3:09 you can highlight area to comment out then: hit alt+3 :)
@footballmarketexpert1219
@footballmarketexpert1219 9 ай бұрын
Remarkable, what is this guy's name?
@abuhena4417
@abuhena4417 8 жыл бұрын
I am a beginner in python language. I have some code inside for/while loop and also have another loop outside the 1st loop. I mean 2 more loops are not nested . How can the python program understand all the loops are not nested and which statement will be the end of the loop . For example, In C program we use 2nd brackets to identify the beginning and the end of the loop .
@vindowmaker5819
@vindowmaker5819 8 жыл бұрын
its but 3 months so i guess you must have figured it out by now:
@infamousinz
@infamousinz 10 жыл бұрын
Ahh programming is confusing....
@murtazahussain6301
@murtazahussain6301 7 жыл бұрын
no
@Marshmallow-bq2lf
@Marshmallow-bq2lf 7 жыл бұрын
ya
@Nk_Lifestyle1
@Nk_Lifestyle1 Жыл бұрын
Most of the times it is, but once you find the solution for your problem it so relaxing fun and that's what makes proggraming very strange in a good way
@i.Enigma
@i.Enigma 6 жыл бұрын
Khan is also a programmer :)
@kareemselim2833
@kareemselim2833 9 жыл бұрын
oh yeah😠😠😠😠😠😠😋😋😋😄😝😚😂😅😡😂😅😝😅😅😡😝😘😘😚😠😂😍😍😜😅😁😄😄😄😄😄😄
@lancejohnson1327
@lancejohnson1327 6 жыл бұрын
Instead of commenting out the code, couldn't you use the break or pass statement?
@saikumar-k7h
@saikumar-k7h Жыл бұрын
Hey thank you so much
@ursulamitwoch5919
@ursulamitwoch5919 8 жыл бұрын
I really need to find where i can download this on mac. I cant find this correspoding app.
@johnpoulsen91
@johnpoulsen91 8 жыл бұрын
+Alex Santouka That would be Text Wrangler or IDLE
@emilhaugen1201
@emilhaugen1201 8 жыл бұрын
Notepad++ also does the job, if you don't mind using the terminal/cmd. (You can even avoid that, if you bother to).
@Christian-dc1sb
@Christian-dc1sb 6 жыл бұрын
@@emilhaugen1201 for a good IDE i recommend pycharm
@lancejohnson1327
@lancejohnson1327 6 жыл бұрын
Can't you just use nano or pico on the terminal on Mac? Just say !# /usr/bin/python at the start so it knows you're using Python latest version.
@valeriatapia1128
@valeriatapia1128 4 жыл бұрын
A good stable text editor for Macs using python is Sublime. It's simple and perfect for Macs
@maribelmendoza7570
@maribelmendoza7570 2 жыл бұрын
Can I ask if how to make a python program that would ask the user to enter a number from 1 to 26? Then based on the number entered by the user, display or output the letter equivalent of the number?
@HogRiderOfficial
@HogRiderOfficial Жыл бұрын
Or second thought code something to do that for u in 7 seconds
@davidjuarez9252
@davidjuarez9252 11 жыл бұрын
Can Khan Academy help? Where I can find good information/ can you make a video for Boolean statements? Ex: !(a 0) I'm having trouble preparing for the AP Compsci exam, and Boolean statements are my weakness xP...
@proeditz9763
@proeditz9763 2 жыл бұрын
isn't '" supposed to be what turns things into comments for python
@redtuxjellyfoxfidgetworld6138
@redtuxjellyfoxfidgetworld6138 2 жыл бұрын
I mean this was 11 years ago XD
@hazzafox329
@hazzafox329 9 жыл бұрын
How can you multply and show a times table using a while loop? for example 2 4 6 8 10 etc
@AstePlougHenriksen
@AstePlougHenriksen 9 жыл бұрын
+harry Fox You could basically do it the same way, but you would have to change the sum/total value to 1 from 0, otherwise all results would be 0 when multiplied. You'd also have to change the incremental change to i to 2, so the code could look like this: total = 1 i = 2 while i < 11: total *= i print total i += 2
@quandaledingleberry5831
@quandaledingleberry5831 3 жыл бұрын
@@AstePlougHenriksen so wrong bro
@juanbarrera5078
@juanbarrera5078 4 жыл бұрын
I still don’t how did you get 6,10,15,21....
@hz2229
@hz2229 3 жыл бұрын
like 6+4 is 10, then 10 +5 is 15. The number added is one more than the previous one. I think its smth liddat
@Genghiskaran
@Genghiskaran 12 жыл бұрын
yea more computer science would be sweet
@tipsbymaithri5469
@tipsbymaithri5469 5 жыл бұрын
too good
@singhinderjit95
@singhinderjit95 13 жыл бұрын
can u make video for ms visual studio c++ and java too, please
@d7oo435
@d7oo435 7 жыл бұрын
will it's not a good anymore for python 3.xx
@frankien.torbor5773
@frankien.torbor5773 10 жыл бұрын
how would you print in descending order?
@partydude1230
@partydude1230 6 жыл бұрын
n = (whatever number you want it to count down from) while n > 0: print(n) n = n - 1
@clashofclanswithitay9016
@clashofclanswithitay9016 10 жыл бұрын
why not def the loop?
@junior1984able
@junior1984able 13 жыл бұрын
C++ is different
@pencilmein6646
@pencilmein6646 7 жыл бұрын
Is PyScripter safe to download from sourceforge?
@raminmc6937
@raminmc6937 4 жыл бұрын
judt get pycharm
@furssher
@furssher 13 жыл бұрын
good stuff
@arandomperson6753
@arandomperson6753 11 ай бұрын
@rijaashraf6412
@rijaashraf6412 6 жыл бұрын
how do i install it on a windows computer. plz send a link
@shikharverma8696
@shikharverma8696 6 жыл бұрын
go to the microsoft
@jakeambrose4294
@jakeambrose4294 7 жыл бұрын
python3- ( mine went to 90 though why? ) sum=0 i=0 while i
@iwinha8495
@iwinha8495 7 жыл бұрын
That is because you didn't edit (or comment) the for loop out. At the end of the while loop, sum=45, and the code then goes to the for loop, making sum=90.
@stinkykyle96
@stinkykyle96 11 жыл бұрын
the process of scripting isnt a language
@AliG-qx7bn
@AliG-qx7bn 11 ай бұрын
Iam so confused
@sk8nplayguitar
@sk8nplayguitar 4 жыл бұрын
so many numbers in the output The code only had 0 , 1, and 10 😰
@rockyshinde4428
@rockyshinde4428 7 жыл бұрын
where can i find pyscripter plz help!!! :,-(
@fakeshadowhunter2064
@fakeshadowhunter2064 5 жыл бұрын
Spyder's good too
@mohamadjamiluddin8051
@mohamadjamiluddin8051 4 жыл бұрын
@@fakeshadowhunter2064 I would reccomend using pycharm
@timan282
@timan282 13 жыл бұрын
...........I LOVE YOU!!!
@UoWealth
@UoWealth Жыл бұрын
Ahhhh it is confusing o
@kenonerboy
@kenonerboy 13 жыл бұрын
dun dun duun duuuun
@S190K
@S190K 11 жыл бұрын
are you god
@igrainnegomez
@igrainnegomez 10 жыл бұрын
da hora hauhsua
@XxStreaker259xX
@XxStreaker259xX 11 жыл бұрын
python scripting isnt computer science, although it IS a computer language
@lancejohnson1327
@lancejohnson1327 6 жыл бұрын
Correct me if I'm wrong, but if it isn't CS then how come I've taken two CS classes that has Python as the main language in it? Also, CS isn't all about coding.
@lancejohnson1327
@lancejohnson1327 6 жыл бұрын
And sure, you're probably going to say because it's a high-level of abstraction that makes it not computer science. This comment may have been from 5 years ago, so I don't know how you're doing now, but you obviously don't relate to HOW a Computer Scientist thinks.
@junior1984able
@junior1984able 13 жыл бұрын
Mit and python.....
Fun with Strings
13:58
Khan Academy
Рет қаралды 204 М.
While loops in Python are easy ♾️
6:58
Bro Code
Рет қаралды 461 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Nested while Loop in Python
12:49
Neso Academy
Рет қаралды 19 М.
While Loops - Intro to Computer Science
6:20
Udacity
Рет қаралды 230 М.
Python While Loops & For Loops | Python tutorial for Beginners
23:11
For loops in Python are easy 🔁
5:06
Bro Code
Рет қаралды 448 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 824 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,3 МЛН
for Loop vs. while Loop in Python
8:45
Neso Academy
Рет қаралды 50 М.