dot/get_num_square.py
2024-10-13 23:41:46 +02:00

11 lines
215 B
Python

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