Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user_response=input("Enter a number: ")
- number=float(user_response)
- guess=number/2
- accuracy=0.01
- while abs(number-(guess**2))>accuracy:
- guess=(guess+(number/guess))/2
- print ("The original number is", number,"and the squared root is", guess)
Add Comment
Please, Sign In to add comment