You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
397 B
24 lines
397 B
import math |
|
|
|
print("Squares and Square Roots") |
|
print("") |
|
|
|
def squared(num): |
|
return num**2 |
|
result = input("Enter a number you would like to square: ") |
|
square = float(result) |
|
|
|
print("The squared value: ",squared(square)) |
|
|
|
def sqroot(): |
|
root = input("Enter a number to find its square root: ") |
|
con = math.sqrt(float(root)) |
|
|
|
print("The square root value: ",con) |
|
|
|
sqroot() |
|
|
|
|
|
|
|
|
|
|
|
|