19 lines
399 B
Python
19 lines
399 B
Python
from continueanyway import ca
|
|
|
|
@ca
|
|
def ValidateInteger(i):
|
|
if type(i)==int:
|
|
print(f"{i} is a valid int")
|
|
return i
|
|
raise ValueError(f"The given number {i} is not a int")
|
|
|
|
def main():
|
|
ValidateInteger("10")
|
|
ValidateInteger(10.0)
|
|
ValidateInteger("dshjkfsdjhfkjsd")
|
|
ValidateInteger(10)
|
|
return 0
|
|
|
|
if __name__ == '__main__':
|
|
main()
|