请帮我解决这个问题,我已经坚持了几个小时:
如何为用户提供他输入的数字的平方根?希望这个世界上有些人知道如何做到这一点。我在互联网上搜索了几个小时,但我的工作一无所获。
答案 0 :(得分:0)
import math # So that we can use the sqrt() function
user_inp = float(input()) # takes in user input value and converts it to float
print (math.sqrt(float(user_inp))) #shows the square root answer to the screen