Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,16 +15,12 @@ def get_userInput():
|
|
| 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 |
-
|
| 21 |
return True
|
| 22 |
else:
|
| 23 |
-
st.write("input is not between 1 and 9 " + user_input)
|
| 24 |
return False
|
| 25 |
-
else:
|
| 26 |
-
st.write("input is not digit" + user_input)
|
| 27 |
-
return False
|
| 28 |
|
| 29 |
def error_Message(msg):
|
| 30 |
st.write(msg)
|
|
|
|
| 15 |
|
| 16 |
def validate_userInput(user_input):
|
| 17 |
#user_input = int(user_input)
|
|
|
|
| 18 |
if int(user_input) >= 1 and int(user_input) <= 9:
|
| 19 |
+
if int(user_input) in st.session_state.legal_numbers:
|
| 20 |
return True
|
| 21 |
else:
|
| 22 |
+
#st.write("input is not between 1 and 9 " + user_input)
|
| 23 |
return False
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
def error_Message(msg):
|
| 26 |
st.write(msg)
|