Комментарии:
Thanks
Ответитьfor i in range(1, 501, 1):
j=i*i
if j<=500:
print(j)
a = []
i=1
while i<=500:
a.append(i)
i+=1
for j in a:
if j*j<=484:
print(j*j)
let us know the nested for loop
Ответитьtask solution:
import math as m
i = ()
for i in range(0,501):
if (i == int(m.sqrt(i)) * int(m.sqrt(i))):
print(i)
I hope it is right
Sir you teach awesome but its my humble request to add more questions of every topic to make our concepts crystal clear
Ответитьquiz to print perfect square:
for i in range(1,500):
print(i**2)
for i in range(1,500):
print("square number of" ,i, "is",i*i)
for i in range (1,501):
for x in range(1,25):
if i == (x*x):
print(i)
Perfect squares numbers between 1-500
import math as m
for i in range(1, 500, 1):
j = i/m.sqrt(i);
if i % j == 0:
print(i)
Answer-1
for i in range(1,501):
if (i*i)<=501:
print(i*i)
excellent explanation
Ответитьimport math
for a in range(500):
b = math.sqrt(a)
if math.ceil(b) == math.floor(b):
print(a)
idk if this is the most efficient but its the only thing i could think of
for i in range(1,501):
if (i*i<=500):
print(i*i)
for a in range(1,501):
if a==0:
pass
else:
print(a*a)
for i in range(1,500):
if m.pow(i,2) < 500:
print(m.pow(i,2))
don't forget to import math
from math import sqrt
for i in range(1,500):
if sqrt(i)%1==0:
print(i)
alternative way
for i in range(500):
if i**2<=500:
print(i**2)
For loop
ОтветитьProgram not run
ОтветитьHello
Ответитьi=1
res=0
while res<=500:
res=i*i
print(res)
i+=1
for i in range(1,100):
if i*i>500:
break
print(i*i)
Hey Navin thank you for this wonderful video !!!!!! 😊
Be bit slow please 😅 concepts are well clear but you are doing so fast 😂
Want give suggestions tht most of guyz are not able to understand ur language as u speak very fast. No doubt ur teaching style is gud bt atleast u can speak slowly.
ОтветитьThank you so much Navin! I totally appreciate the pace and thoroughness of your videos. I'll be watching!
Ответитьanswer to the quiz is:
from math import sqrt
for i in range(1,500,1):
for a in range(1,500,1):
if(sqrt(i)==int(a)):
print(i)
for i in range(23):
print(i*i)
import math as m
for i in range(1,501):
if m.floor(m.sqrt(i))-m.sqrt(i)==0:
print(i,end=" ")
Thanks Telusko 🌠
Ответитьyour explanation is very good sir, i have suggest your playlists to my other friends whose are learning websites.
ОтветитьThank you Sir 🙏
Ответитьfor i in range(1,23):
print(i*i)
can you explain do while loop
ОтветитьAnswer is - for i in range(1,50,2):
print(i)
# output is
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
39
41
43
45
47
49
for i in range(1,500):
if i<=22:
print(i**2)
else:
break
learning from you sir
ОтветитьSolution for E1
# print all the perfect square number between 1 and 500
for i in range(1,501):
if i**0.5 == int(i**0.5):
print(i, "is a perfect square")
For loops here way better than java
ОтветитьBest explanation of for loop. Will never get confused. Thankyou so much
Ответитьthanks for the video
ОтветитьBro you are a life saver
ОтветитьThanks a lot your videos really so useful!
ОтветитьLoving this series
ОтветитьGood explanation
Ответитьanswer:
for i in range(1, 501):
if i ** 0.5 % 1 == 0:
print(i)
Import math
I=1
for I in range (0, 501) :
if math. sqrt(I) = = int(math.sqrt(I) :
print (I)
Hi, plz tell me how to write 3 statements in for loop and assign a new value
And if cindition which will run after loop completion in the same prog
I wonder if I can use this for a list of lists. If I have some data I want to write to a CSV, maybe I could use a for loop that references each list and writes it as a line in the CSV
Ответить