fix(r-1.3_scratch.py): I removed the convoluted order that I did things, starting from the beginning again
This commit is contained in:
+2
-16
@@ -10,22 +10,8 @@ backwards into the function itself. I need to find a way to end the input loop
|
||||
that I've created.'
|
||||
"""
|
||||
|
||||
data = []
|
||||
y = True
|
||||
while y == True:
|
||||
x = input('Enter a number (type "quit" to stop): ')
|
||||
try:
|
||||
x = float(x)
|
||||
x = str("quit")
|
||||
if x == str("quit"):
|
||||
break
|
||||
except:
|
||||
input('Please enter a number: ')
|
||||
else:
|
||||
if x == float(x):
|
||||
data += [x,]
|
||||
|
||||
print(data)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user