-
-
Save uncoded-ro/a8b46f2f8bf636611d7146b9a2280903 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: | |
numar = int(input("Introdu un intreg pozitiv: ")) | |
if numar <= 0: | |
raise ValueError("Acesta nu este un numar pozitiv!") | |
except ValueError as e: | |
print(e) | |
else: | |
print("Multumim!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment