feat(r-1.3_scratch.py): tried breaking the loop
This commit is contained in:
@@ -12,13 +12,13 @@ that I've created.'
|
||||
|
||||
y = True
|
||||
while y == True:
|
||||
x = input('Enter a number: ')
|
||||
x = input('Enter a number (type "quit" to stop): ')
|
||||
try:
|
||||
x = float(x)
|
||||
if x != float(x):
|
||||
y = False
|
||||
except:
|
||||
input('Please enter a number: ')
|
||||
if x == float(x):
|
||||
data = [x]
|
||||
print(data)
|
||||
else:
|
||||
if x == str(quit):
|
||||
break
|
||||
Reference in New Issue
Block a user