Python For Loops - Python Tutorial for Absolute Beginners

Python For Loops - Python Tutorial for Absolute Beginners

Programming with Mosh

5 лет назад

552,837 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@badmath9099
@badmath9099 - 30.11.2023 21:12

I feel like this is going to save me a bunch of copying and pasting 😅

Ответить
@user-cp7jz2oh1m
@user-cp7jz2oh1m - 26.11.2023 04:35

این همه وقت کجا بودید؟🙂

Ответить
@user-ym2ys9ij5r
@user-ym2ys9ij5r - 23.11.2023 19:20

bless you my man, bless you. Top tier crash courses out there

Ответить
@samirchamling2243
@samirchamling2243 - 14.11.2023 02:58

Hi Mosh,
I have a list output from my python code that I extract from shareppoint, I stored that list in one variable but when I run for loop, it give me error string is not iterable, how can I loop through string which is in string format ?

Ответить
@neerajnegi3517
@neerajnegi3517 - 13.11.2023 13:11

Really easy to understand

Ответить
@daviddean5512
@daviddean5512 - 31.10.2023 21:58

why for the final example can't you just write

for x in range(2, 10, 2):
print(x)
print("We have 4 odd numbers")

Is it because if the interval was something like (2, 198534, 2) you could write the wrong amount

Ответить
@votindunajnr8667
@votindunajnr8667 - 29.10.2023 22:08

even_number = 0
for i in range(1, 10):
if i % 2 == 0:
print (i)
even_number += 1
print(" we have", even_number, "even numbers")

Ответить
@tyrajosef
@tyrajosef - 12.10.2023 11:31

farsi yad midin ?

Ответить
@Mansuru2007
@Mansuru2007 - 08.10.2023 22:37

What IDE are you using?

Ответить
@jimgraham1404
@jimgraham1404 - 08.10.2023 12:21

Thank you mosh. I know it’s simple and it’s perfect 😊

Ответить
@epicvoyager5938
@epicvoyager5938 - 26.09.2023 23:25

Thank you for the simple and quick instructions, you've been a great help!!

Ответить
@rogs2889
@rogs2889 - 25.09.2023 00:37

For loops got me stumped but I'm gonna just chug along fuck it

Ответить
@cornationboot8690
@cornationboot8690 - 21.09.2023 15:45

count = 0
for x in range (2,10,2):
print(x)
count +=1
print("We have {count} even numbers")

Ответить
@yourpapa6641
@yourpapa6641 - 21.09.2023 05:55

count = 0
for x in range (1,10):
if x % 2 == 0:
count += 1
print(x)
print("We have " + str(count) + " even numbers")

Ответить
@davidconiglio7577
@davidconiglio7577 - 11.09.2023 14:57

Mosh, I have questions using data ,I was using the liberty basic and truebasic programming language and find out they were slow when using a list of combinations lottery, it take about 3 hours or more. When I used phyton, I was shocked at how fast it was .My difficulty is what function to use data and how use ?

Ответить
@rohitsd7732
@rohitsd7732 - 03.09.2023 12:41

for even in range(1,10):
if even%2==0:
print(even)
print('we have 4 even numbers')

Ответить
@airmett8939
@airmett8939 - 21.06.2023 02:04

for x in range(1, 10):
if x%2==0:
print(x)

Ответить
@chunyiptaxi
@chunyiptaxi - 15.06.2023 20:10

thanks for your clear explanation

Ответить
@waooooooo
@waooooooo - 25.05.2023 05:18

I was doing so great up to this point, I don't understand 😭😢

Ответить
@eliuddelacruz5353
@eliuddelacruz5353 - 24.05.2023 23:01

I’ve looked everywhere online and I can’t find anything that explains for loops or while loops well enough for me to understand. Why didn’t the string “Attempt” print out three times or the word successful? Also what does the word number do what’s its purpose? Where did you get the word from? Why that word?

Ответить
@BIackBoomBox
@BIackBoomBox - 20.05.2023 12:29

Love the example you showed with the email. Made it easier to understand

Ответить
@legendeagle6211
@legendeagle6211 - 15.05.2023 17:01

manarite

Ответить
@brianligat2038
@brianligat2038 - 08.05.2023 14:49

I cannot recomment Mosh's tutorials enough. Easy to follow, helpful and friendly style.

Ответить
@patricias9866
@patricias9866 - 12.04.2023 16:08

Wow!! This is awesome. I'm in a bootcamp and this was confusing. Thanks for posting this. I hipe you consider posting more recent tutorials.

Ответить
@thelolimaster359
@thelolimaster359 - 19.03.2023 22:39

So the value of count updates globally because for is not a function?

Ответить
@chrisberdin
@chrisberdin - 19.03.2023 14:41

It’s not about the code, it’s about sending a message!! 😂😂

Ответить
@XzibitMe
@XzibitMe - 10.03.2023 00:01

Coding is fun and all but its a harsh reminder im gonna lose all my hair when watching mosh lol

Ответить
@darkdravenpog4863
@darkdravenpog4863 - 07.03.2023 22:59

i believe you can use this to make automatic code generators but it would be really rare

Ответить
@faizanrana9049
@faizanrana9049 - 28.02.2023 22:26

which tool are you using for python.

Ответить
@dimimuoluwaolawepo2740
@dimimuoluwaolawepo2740 - 25.02.2023 01:04

When I input the count

It says "'name "count' is not defined''

Ответить
@praanadhyarlagadda6413
@praanadhyarlagadda6413 - 13.02.2023 16:18

thanks so much, i have an exam.

Ответить
@naze8793
@naze8793 - 27.01.2023 03:59

I’m disappointed as I couldn’t learn a thing of this

Ответить
@christianwiah4526
@christianwiah4526 - 26.12.2022 18:25

Thanks, Mosh - Your lectures are simplified and easy to follow.

Ответить
@abdulmd1083
@abdulmd1083 - 26.12.2022 01:47

mosh is genius

Ответить
@syedmohammedakberhussaini5620
@syedmohammedakberhussaini5620 - 12.12.2022 17:56

Dude, You made my Basics Very Strong
print("Thank You Mosh")

Ответить
@cameronlarson5485
@cameronlarson5485 - 05.12.2022 02:31

what is this program that is being used? I use jupyter, but I like the layout of this program.

Ответить
@jaypeedizon3006
@jaypeedizon3006 - 04.12.2022 00:06

How would you count characters in words?😃

Ответить
@paolog2524
@paolog2524 - 30.11.2022 20:44

Thank you

Ответить
@mahithacr5862
@mahithacr5862 - 14.11.2022 17:54

Anybody plz tell..in which app this codings r done???

Ответить
@toonboiman7932
@toonboiman7932 - 13.11.2022 19:54

AUGLA BULAGJVHBHjbuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuugyuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

Ответить
@toonboiman7932
@toonboiman7932 - 13.11.2022 19:53

ASDFGHJJJJJJYHNVHJIVFRTYFGH
CFRTYFGHVFTYYHBNJKIIKMK,KIOYHJUIUJHNB

Ответить
@dawidmarszaek3106
@dawidmarszaek3106 - 03.11.2022 01:31

How did you get this nice-looking Output window? I am looking for it for so long and the only one I have got is a terminal window with all of the paths, ending messages which are distracting. I would be grateful for telling me how to open this Output view.

Ответить
@alexgicheha5755
@alexgicheha5755 - 27.10.2022 17:44

Hi Mosh! You're the best Tutor.

I am looking forward to learning more from you.

I want to learn python for data analysis, web development, and game development.

I welcome all the challenges, but I am passionate about becoming a Pythonista. Whatever it takes, Mosh, as long as you're my tutor, I know I'll make a great programmer like you.😘🤩

Ответить
@druskii90
@druskii90 - 27.09.2022 18:19

Thank you for explaining for loops very clearly, idk I've been struggling to understand them and this helped so much! Sub earned!

Ответить