Computer Science, asked by 2018rahulshah, 4 months ago

What is the error...Bruh...Can anyone help me

Attachments:

Answers

Answered by anindyaadhikari13
3

Answer:

This is the corrected program for the question.

import math as m

print("Enter the number you want square root for")

a=int(input()) #Note: You can also write float(input())

x=m.sqrt(a)

print(a)

Explanation:

  • In the fourth line, you wrote - a = input(). So, a is considered as string. You can't take square root of a string. So, at first, convert the input into either integer or float value and then take the square root.
Similar questions