For Loop In Python | 10 Problems Solved & Explained | Python for Beginners

For Loop In Python | 10 Problems Solved & Explained | Python for Beginners

Coding With Sagar

1 месяц назад

10,098 Просмотров

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


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

@MenX-ry7ms
@MenX-ry7ms - 09.11.2024 04:49

Sir, Please 🙏 reply
I am a first year student
Mere collage me sb c aur c ++ sikh rhe hai including me . par ai aur machine learning jisme me interester hu usne python ka role jyada hai hai to me c aur c ++ sikhu ya python par shift kru ?

Ответить
@Refer_CODE-0wh06
@Refer_CODE-0wh06 - 09.11.2024 05:59

Thankyou so much bhai

Ответить
@woweditz302
@woweditz302 - 09.11.2024 06:26

More easy way to solve Qno.9:-

n = int(input("Enter a number: "))
for i in range(2, n+1):
if n ℅ 2 == 0:
print("Number is not prime!")
break
else:
print("Number is prime!")

Ответить
@rajvardhanaryaputra32
@rajvardhanaryaputra32 - 09.11.2024 06:40

While

Ответить
@aboy7097
@aboy7097 - 09.11.2024 09:09

Thank you so much 🤩

Ответить
@Shubham_Sahane
@Shubham_Sahane - 09.11.2024 13:11

Much needed series , we want more videos ❤

Ответить
@vipin_maurya2023
@vipin_maurya2023 - 09.11.2024 16:50

* * * * *
*. *
* *
* * * * * *
Please code this by using space 😒

Ответить
@mr__k__k__000
@mr__k__k__000 - 09.11.2024 17:11

While ❤❤❤

Ответить
@zubairzeeshan-y3w
@zubairzeeshan-y3w - 09.11.2024 19:29

while

Ответить
@kattubadimahaboobbasha325
@kattubadimahaboobbasha325 - 09.11.2024 22:24

Really needed bro❤

Ответить
@Farha-e5v
@Farha-e5v - 10.11.2024 06:07

Thank you, please post more of these videos.

Ответить
@raj_creation.9835
@raj_creation.9835 - 10.11.2024 09:35

Great series bhaiya plz continue this amazing series ❤

Ответить
@fifaforum-ez3kn
@fifaforum-ez3kn - 10.11.2024 09:58

yes sir it helps us can you make more video on list tuple and function

Ответить
@govindkaushik7967
@govindkaushik7967 - 10.11.2024 11:02

needed series but bhai i'm practicing for data analyst so can you please give us some that type of videos using python.

Ответить
@ShyamsundarTomar
@ShyamsundarTomar - 10.11.2024 12:17

while

Ответить
@Kishan-j3b
@Kishan-j3b - 10.11.2024 14:30

Thanks a lot.

Ответить
@HimanshuManiTripathi-wf6yl
@HimanshuManiTripathi-wf6yl - 10.11.2024 17:33

bro plz while loop bhi thanks a lot 😍😍😍

Ответить
@Yaan_37
@Yaan_37 - 10.11.2024 20:52

More easy way to solve Qno.3-
for i in range(2,11,2):
print(i , end = " ")

Ответить
@anas.ahmed.27
@anas.ahmed.27 - 11.11.2024 07:08

Sagar Bhai reply do kya ham Mobile se python sikh sakte hai kya 😢

Ответить
@faiyazkhan4152
@faiyazkhan4152 - 11.11.2024 11:53

We want more such videos like this🙌

Ответить
@devyadav683
@devyadav683 - 11.11.2024 12:01

while

Ответить
@Yaan_37
@Yaan_37 - 11.11.2024 22:24

Question 7 can also be solved as:
a , b = 0 , 1
total = 0
for _ in range(10):
print( total , end = " ")
a ,b = b , a + b
total = a

Ответить
@iamgamer369
@iamgamer369 - 11.11.2024 22:56

Bhai jan web development kab start kr rahy django ke sath

Ответить
@affiliatemarketingchanal4638
@affiliatemarketingchanal4638 - 12.11.2024 12:44

Sagar bhai abi jo newz ai hai kay 25% code Ai say ganreate keya ja raha hai abi python learn krni chaheye nahi

Ответить
@alokupadhyay-ek5ku
@alokupadhyay-ek5ku - 12.11.2024 18:38

Thank you bhai ❤

Ответить
@shivamlikesdata
@shivamlikesdata - 12.11.2024 19:11

que. 5 much simpler way
word = 'python'
for i in word[::-1]:
print(i, end= "")

Ответить
@abhinash214
@abhinash214 - 13.11.2024 05:22

Thank you sir

Ответить
@technicalsanjeev8630
@technicalsanjeev8630 - 13.11.2024 10:11

Q6.
str=input("Enter string: ")
lst=[]
for i in str.lower():
if i=='a' or i=='e' or i=='i' or i=='o' or i=='u':
lst.append(i)
print(len(lst))

Ответить
@technicalsanjeev8630
@technicalsanjeev8630 - 13.11.2024 10:17

Q6.Method 2
str=input("Enter string: ")
lst=[]
word='aeiou'
for i in str.lower():
if i in word:
lst.append(i)
print(len(lst))

Ответить
@sachinbamaniya467
@sachinbamaniya467 - 13.11.2024 11:03

Yeah bro we need more videos like this

Ответить
@ArmanAli-mk2rs
@ArmanAli-mk2rs - 13.11.2024 16:25

Thank you bhaiya ❤❤❤❤❤❤

Ответить
@Glorytroly9092
@Glorytroly9092 - 13.11.2024 21:15

Ye needed thi aur chaiye.....

Ответить
@sakil999-p9h
@sakil999-p9h - 17.11.2024 21:27

Easy way to solve the question no. 10 is :
a ='programming'
for letter in a :
S = a.count(letter)
print(f ' the no. of the letter {letter} is : {S}')

Ответить
@AniketBiswas-ab22
@AniketBiswas-ab22 - 19.11.2024 12:04

Thank you bhaia .Keya ap python ke orbhi questions Kara sakte he . using oops, function

Ответить
@Hassanmujtaba74
@Hassanmujtaba74 - 20.11.2024 14:25

Was Needed..and more Required

Ответить
@KamleshPatel-nz4bo
@KamleshPatel-nz4bo - 22.11.2024 19:52

Thank you bhaiya much needed for ip class 11

Ответить
@devgaur7591
@devgaur7591 - 23.11.2024 18:09

function and dictionary ke Problems solve video bana le na.. pl

Ответить
@saturneditsxd
@saturneditsxd - 24.11.2024 16:41

word ="python"
a = len(word)
for i in reversed(range(a)):
print(word[i])
Too easy❤

Ответить
@Sadikshah099
@Sadikshah099 - 25.11.2024 09:33

Thanks 🙏

Ответить
@Sadikshah099
@Sadikshah099 - 25.11.2024 09:40

Continue this playlist. It's very useful ❤
Watching from Bangladesh

Ответить
@aritramukhopadhyay435
@aritramukhopadhyay435 - 25.11.2024 22:47

After writing the code that your wrote for Q6, it was not giving the proper output.
vowels = ["a", "e", "i", "o", "u"] # Correctly list individual vowels
word = str(input("Enter a word: "))
count = 0
for char in word:
if char.lower() in vowels: # Ensure comparison is case-insensitive
count += 1
print(f"Total vowels in {word} is {count}")

Had to make two changes. Am I the only one facing the problem?

Ответить
@animeboy1433
@animeboy1433 - 03.12.2024 15:08

Sagar bhai aap bata do plz
i=1
small=?
while i<=5:
a=int(input("enter a no"))
if a<small:
small=a
i=i+1
print("smallest no is",small)

? Iss me kya hona chahiye bata o
Bhai abb hi bata do 😢

Ответить
@aaa8051
@aaa8051 - 08.12.2024 08:37

Sir please make a full course while and for loop besic to high😢

Ответить
@MohdJavid-iw4jt
@MohdJavid-iw4jt - 13.12.2024 17:58

Sagar sir please give lacture of how to solve the pattern by using for loop

Ответить
@cloudtechankit
@cloudtechankit - 18.12.2024 17:25

❤❤❤❤❤

Ответить
@sahilsharma1800
@sahilsharma1800 - 21.12.2024 13:18

Nice broo 👍

Ответить
@Jeeaspirants247
@Jeeaspirants247 - 27.12.2024 16:35

bhaiya is tarikee se bhi ho sakta hee


n = int(input("Enter no. :"))
if n <= 0:
print("positive no.")
else:
for i in range(1, n + 1):
if (n - 1) % i == 0:
print("not prime")
else:
print("primer")

Ответить
@Govindhuujh
@Govindhuujh - 28.12.2024 11:58

Thank you sir ji

Ответить