Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def get_userInput():
|
|
| 15 |
|
| 16 |
def validate_userInput(user_input):
|
| 17 |
#user_input = int(user_input)
|
| 18 |
-
if user_input.
|
| 19 |
if int(user_input) >= 1 and int(user_input) <= 9:
|
| 20 |
#if int(user_input) in st.session_state.legal_numbers:
|
| 21 |
return True
|
|
@@ -133,7 +133,6 @@ replay=st.button('Replay')
|
|
| 133 |
|
| 134 |
#Button functionality
|
| 135 |
if submit:
|
| 136 |
-
response=validate_userInput(user_input)
|
| 137 |
response=validate_userInput(user_input)
|
| 138 |
if response:
|
| 139 |
update_legalNumbers(user_input)
|
|
|
|
| 15 |
|
| 16 |
def validate_userInput(user_input):
|
| 17 |
#user_input = int(user_input)
|
| 18 |
+
if user_input.isnumeric():
|
| 19 |
if int(user_input) >= 1 and int(user_input) <= 9:
|
| 20 |
#if int(user_input) in st.session_state.legal_numbers:
|
| 21 |
return True
|
|
|
|
| 133 |
|
| 134 |
#Button functionality
|
| 135 |
if submit:
|
|
|
|
| 136 |
response=validate_userInput(user_input)
|
| 137 |
if response:
|
| 138 |
update_legalNumbers(user_input)
|