feat(r-1.3_scratch.py): confirmed verification loop works
This commit is contained in:
+15
-2
@@ -4,7 +4,20 @@
|
|||||||
Created on Wed Sep 2 22:49:38 2026
|
Created on Wed Sep 2 22:49:38 2026
|
||||||
|
|
||||||
@author: joseph
|
@author: joseph
|
||||||
|
- I started working backwards at a point and wanted to figure out how to take
|
||||||
|
multiple instances of user input and create a list out of them and work
|
||||||
|
backwards into the function itself
|
||||||
"""
|
"""
|
||||||
|
|
||||||
data = list(input('Input any amount of numbers, separated by spaces...'))
|
y = True
|
||||||
print(data)
|
while y == True:
|
||||||
|
x = input('Enter a number: ')
|
||||||
|
try:
|
||||||
|
x = float(x)
|
||||||
|
if x != float(x):
|
||||||
|
y = False
|
||||||
|
except:
|
||||||
|
input('Please enter a number: ')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user