Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

marianoinput-0.0.6-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page