dot/get_num_square.py

12 lines
215 B
Python
Raw Normal View History

2024-07-30 20:08:05 +00:00
import os
num = os.environ.get("INPUT_NUM")
if num:
try:
num = int(num)
except Exception:
exit("ERROR: the INPUT_NUM provided ({num}) is not an integer")
print(num**2)
else:
num = 1