+ 1

My code don't work - Python

Hello guys, I finished to write my code in Python, but the program don't work.. Can you help me? https://code.sololearn.com/cK9grOLj5zU4/?ref=app

16th Feb 2019, 1:34 PM
Niko😉
Niko😉 - avatar
6 Answers
+ 7
z=int(print(x*x)) will try to convert the return value of print, which is None, to an integer. That won't work if int(z>0) will evaluate z>0 and convert the result to an integer. Change it to if int(z)>0 or if z > 0 as you've already converted z to an integer before The last line doesn't do anything but ask for input and convert it to a float
16th Feb 2019, 1:37 PM
Anna
Anna - avatar
+ 3
Line 2: z=int(print(x*x)) Must be changed to: z=int(x*x) print(z)
16th Feb 2019, 1:37 PM
J.G.
J.G. - avatar
+ 2
Edward Danke 😅
16th Feb 2019, 7:35 PM
Anna
Anna - avatar
+ 1
Anna you are an angel of kindness and patience.
16th Feb 2019, 7:28 PM
Edward
Edward - avatar
0
I changed my code, thank you, now it work correcly 😊😊✌
16th Feb 2019, 1:46 PM
Niko😉
Niko😉 - avatar
0
betulkan code anda
17th Feb 2019, 2:02 AM
najmiitaufikk