Skip to content

Instantly share code, notes, and snippets.

@zorexsalvo
Created February 26, 2022 04:13
Show Gist options
  • Save zorexsalvo/0206d0d7bd6a4d0e476aa864cb1b835d to your computer and use it in GitHub Desktop.
Save zorexsalvo/0206d0d7bd6a4d0e476aa864cb1b835d to your computer and use it in GitHub Desktop.
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