Created
February 26, 2022 04:13
-
-
Save zorexsalvo/0206d0d7bd6a4d0e476aa864cb1b835d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
n = input() | |
n = int(n) | |
if n >= 1: | |
for i in range(n): | |
print(i ** 2) | |
else: | |
print("Invalid input.") | |
except ValueError: | |
print("Invalid input.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment