Easily get valid numeric and boolean input from user
Project description
You may need to prompt the user for a numeric or a boolean value
However what if the user types something invalid ?
This library solves this difficult problem with simplicity
marianoinput has PenguinPrompt, with which you can use to easily get valid user input.
If user inputs invalid input, then it will re-prompt the user
Sample Code..
from marianoinput import PenguinPrompt
pen= PenguinPrompt()
age=pen.prompt_int_range("whats you age ?", 18,100)
height=pen.prompt_float_range("whats you height in meters ?",1,3)
yesno= pen.prompt_yesno("Do you wish to continue ?")
print(age, height, yesno)
If you like this library check out my other libary "marianodoc" for producing word docs
https://pypi.org/project/marianodoc/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file marianoinput-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: marianoinput-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0e37fa937ada4e95dcdb377ea5ec1760c945b6457ae4670450dd692bb162a77 |
|
MD5 | ca37ec370f42d2182df44eef74a29ca9 |
|
BLAKE2b-256 | 4cacb960efa2a794bf6b7e056da9c8dd98b28aeab709064f1b10e2fcfe510f98 |