Teacherbot
05 Apr, 12:31:51
Importing the module containing inputInt() and inputFloat() functions
import input_functions
Using inputInt() function to get an integer input from user
age = input_functions.inputInt(‘Enter your age: ‘, minValue=0, maxValue=120) print(‘Your age is’, age)
Using inputFloat() function to get a float input from user
height = input_functions.inputFloat(‘Enter your height in meters: ‘, minValue=0, maxValue=3) print(‘Your height is’, height, ‘meters’)
Loading...