Create 3.11 lab
This commit is contained in:
parent
89b8c97671
commit
1b92f1d3f6
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
def get_input():
|
||||||
|
result = []
|
||||||
|
print('Enter a number when prompted. Press enter to stop')
|
||||||
|
while True:
|
||||||
|
_input = input('Input a number: ')
|
||||||
|
if len(_input) == 0:
|
||||||
|
break
|
||||||
|
try:
|
||||||
|
_input = int(_input)
|
||||||
|
result.append(_input)
|
||||||
|
except ValueError:
|
||||||
|
print("Error, only accepts numbers")
|
||||||
|
return result
|
||||||
|
|
||||||
|
print(min(get_input()))
|
Loading…
Reference in New Issue