Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Package Requirements A module for functions related to numeric input An integer input function that only allows whole numbers A float input function that allows
Package Requirements
A module for functions related to numeric input
An integer input function that only allows whole numbers
A float input function that allows numbers with or without decimals.
Two functions integer and float that ensure the input does not exceed a maximum value specified by a parameter
Two functions integer and float that ensure the input falls between a minimum value and a maximum value specified by parameters
A module for functions related to boolean input
An input function that allows the user to input true or false. It should be caseinsensitive and should also allow the user to abbreviate t or f
An input function that allows the user to input yes or no It should be caseinsensitive and should also allow the user to abbreviate y or n
A module for functions related to string input
A function that only allows specific responses, which should be passed into the function as a list parameter. For example, if you are asking the user to select a color, you might pass in red 'green', 'blue', 'white', 'yellow' This function should be case sensitive
A caseinsenstive version of the previous function. Again, allowable choices should be passed in as a list parameter.
Usability Requirements
Use names package modules, functions that follow PEP guidelines and "feel" similar to Python names you're familiar with.
Each function should present a prompt that is passed in as a parameter, similar to how input works.
Unexpected input should be handled without crashing eg entering text when prompted for a number
When the user enters an invalid response, provide a basic error message.
Once input passes the validation checks, it should be returned rather than printed out. You'll want to be able to do something with the input after you get it
Configure your package so that the functions in all three modules are accessible after just one import or from statement.
Configure your package so that functions are accessible without any "dot" notation. For example, I should be able to call myfunction without needing to type mypackage.myfunction
If you create any "helper functions" additional functions beyond those listed in the requirements those functions should not be accessible unless they are specifically imported.
Each file should include a comment at the top with a brief summary of the functions it contains.
Demonstration Program
Include a separate programscript that demonstrates the package's functionality by importing it and using all functions.
The demo program can be an application that uses the functions in a realistic way, or it can simply be a program that calls all of the functions to show how they work.
The demo program should include the full commentheader block required on assignments.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started