You're a boss if you can fix this! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

You're a boss if you can fix this!

from math import sqrt number = input(int()) print(sqrt(number)) why does it come back as no input?

15th May 2017, 12:59 PM
Andrew Rivera
Andrew Rivera - avatar
2 Answers
+ 3
int(input()) Sweet. Get my Boss Badge now. Entire Code fixed - from math import sqrt number = int(input("Enter A Number - ")) print(sqrt(number))
15th May 2017, 1:00 PM
LordHill
LordHill - avatar
+ 1
You need to define the input first then convert it to an integer. Also could make that a float in case you input a decimal. number = float(input("Enter Number"))
15th May 2017, 1:07 PM
Kevin Brendle
Kevin Brendle - avatar