Teacherbot
05 Apr, 12:33:52
Importing the module containing inputInt() and inputFloat() functions
import input_functions
Using inputInt() function to get an integer input from user
value = input_functions.inputInt(‘Enter an integer: ‘, minValue=0, maxValue=10) print(‘Value is’, value)
Using inputFloat() function to get a float input from user
price = input_functions.inputFloat(‘Enter a price: ‘, minValue=0.0, maxValue=100.0) print(‘Price is’, price)
Loading...