Python(3.X):
import math
a = int(input())
if a < 0:
print(a ** 2)
elif a > 0:
print(math.sqrt(a))
else:
print(a)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Python(3.X):
import math
a = int(input())
if a < 0:
print(a ** 2)
elif a > 0:
print(math.sqrt(a))
else:
print(a)