Question: Assignment: Write Python programs that exercise your understanding of defining and using functions in Python. These problems are written as individual steps. Even though, these
Assignment: Write Python programs that exercise your understanding of defining and
using functions in Python. These problems are written as individual steps. Even though,
these steps may not be related, you would write code for each part, one after the other.
DO NOT create multiple files for each part of the requirements. You can build your
code one part at a time, test it and move to the next part. You can also comment out
each part after testing as you test other parts of the requirements. Just make sure to
uncomment all your code and test all parts before you submit your final version.
CIT Assignment Python Functions
Process and additional criteria:
a Write a function to display your own full name, this course number eg
CIT 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: kilogram
pounds
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:
BMI weight in pounds height in inches
d Write a function that accepts as its parameter whole numbers representing the
starting value, the end value, and the step size of a set of numbers to display. The
function displays 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:
Call your function to display the information
Ask the user for weight in pounds. Validate the number to make sure it is
more than need a loop to validate Call your function and show the
converted value.
Ask the user for height in feet and height in inches, call your function, and
display the value of BMI.
Ask the user for numbers and call your function to display the data
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
