pill container: script to generate the STL files
This commit is contained in:
1 parent
16e69fb10d
commit
7620cec17d
3 files changed
+138
No files matched your search
@@ -26,3 +26,16 @@ def ask_float(prompt: str) -> float:
|
||||
return value
|
||||
except ValueError:
|
||||
print("Please enter a valid number.")
|
||||
|
||||
def ask_yes_no(prompt: str) -> bool:
|
||||
"""Prompt the user for a yes/no answer."""
|
||||
while True:
|
||||
answer = input(prompt).strip().lower()
|
||||
|
||||
if answer in {"y", "yes"}:
|
||||
return True
|
||||
|
||||
if answer in {"n", "no"}:
|
||||
return False
|
||||
|
||||
print("Please enter yes or no. [y/n]")
|
||||
Reference in new issue
Block a user