Code showing no output | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

Code showing no output

Hi guys I have been learning python for some time and i wrote a self described function which can calculate integer square root. But for some reason it shows no output on sololearn I wonder why is that? Any help would be appreciated Thanks Heres the code: def sqrtno(a,b,*c): li=list(c) if a<0: a= -(a) if b<0: b= -(b) d=1 f=0 while d<a: d=1 f=0 f=d*d if f==a: print (f"Perfect Square root of {a} = {d}") break d=d+1 if f!=a: print ("PerfectSquare Root Does not Exist") while d<b: d=1 f=0 f=d*d if f==b: print (f"Perfect Square root of {b} = {d}") break d=d+1 if f!=b: print ("PerfectSquare Root Does not Exist") for i in li: while d<=i: d=1 f=0 f=d*d if f==i: print (f"Perfect Square root of {i} = {d}") break d=d+1 if f!=i: print ("PerfectSquare Root Does not Exist")

6th Jul 2020, 4:17 PM
Huzaifa Imran
Huzaifa Imran - avatar
2 Respuestas
+ 4
You have created a function, but it is never called. May be you can also tell us what the 3 arguments for the function mean. Thanks! It would be better if you ask for help, when your code is in playground and blank lines are removed.
6th Jul 2020, 4:55 PM
Lothar
Lothar - avatar
+ 1
Thank You!
25th Nov 2020, 3:27 AM
Huzaifa Imran
Huzaifa Imran - avatar