a) Write a function to display your own full name, this course number (e.g. IS115), and the number of hours it took you to complete this assignment. Note there is no input statements inside this function.
b) Write a function that accepts the weight of a person in pounds as its parameter and returns the weight in kilograms. The simple conversion formula is: pounds / 2.2
c) Write a function that accepts as its parameters, the weight, height in feet, and height in inches and return the Body Mass Index (BMI). BMI is calculated as: weight in pounds * 703 / (height in inches2)
d) Write a function that accepts as its parameter 3 whole numbers representing the starting value, the end value, and the step size of a set of numbers to display. The functions display all whole numbers between the first and second number with an increment of the third number. If the first number is more than the second number, print an error message.
e) Write the main function to call these functions and perform the required tasks. In the main function:
# display information
def info():
# convert weight in pounds to kilograms
def convertWeight(weightPound):
# calculate Body Mass Index
def findBMI(weight, heightFeet, heightInches):
# display data
def displaydata (first, second, increment):
# the main function
def main():
# call the functions to process the data
main() ### call the main to start the process
Make sure to fully test your code. Make sure to re-create all the output shown in the sample runs.
Foo Bar
IS115
Number of hours to complete this assignment: 2 hours
Enter weight in pounds: 160
Weight in Kilograms = 72.73
Enter your height in feet: 5
Enter your height in inches: 8
BMI: 24.33
Enter starting value of a set of numbers to print: 4
Enter ending value of a set of numbers to print: 10
Enter the increment for the set of numbers to print: 2
4
6
8
10
Foo Bar
IS115
Number of hours to complete this assignment: 2 hours
Enter weight in pounds: -1
Invalid weight - Enter weight in pounds: -10
Invalid weight - Enter weight in pounds: 160
Weight in Kilograms = 72.73
Enter your height in feet: 5
Enter your height in inches: 8
BMI: 24.33
Enter starting value of a set of numbers to print: 10
Enter ending value of a set of numbers to print: 2
Enter the increment for the set of numbers to print: 2
There is no data to display!