Python Program to Find the Square Root

In this program, you’ll learn Python Program to Find the Square Root.

n = int(input("Enter a number: "))
if n == 'x':
    exit()
else:
    number = int(n)
    number_sqrt = number ** 0.5
    print("Square Root of %0.2f is %0.2f" %(number, number_sqrt))

Output:

Python Square Root

Recommended Posts:

Python
    1. Python Features
    2. Python Applications
    3. Python Keywords
    4. Python installation
    5. Python variables and identifiers
    6. Python Data Types
    7. Python Operators
    8. Type Conversion in Python
    9. Python Program to Find Area Of Circle
    10. Python Conditional Statements : if-else, elif, nested if statements
    11. Python Loops
    12. Python Program to Check Armstrong Number
    13. Python Program to Print Pascal Triangle
    14. Python Program to Find the Square Root