Skip to content

Commit d720d06

Browse files
Add files via upload
1 parent a6e66a7 commit d720d06

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: Try and Except.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def main():
2+
l = loop("Enter a integer: ")
3+
print(f"x is {l}")
4+
5+
6+
def loop(x):
7+
while True:
8+
try:
9+
return int(input(x))
10+
except ValueError:
11+
continue
12+
13+
14+
main()

0 commit comments

Comments
 (0)