In: Computer Science
Program Specifications:
PART ONE:
The client would like a program that inputs a user's first and last name. The program will also input the user's height and weight.
The program will output the following for the input data. (assuming the input was Dennis, Hunchuck, 6.0, 220.0)
You can assume that the user runs 1 mile per day. The user loses 1/2 pound for each day he or she runs. You can ask the user how many days he or she went running.
PART TWO:
You can assume a stool is 1.5 feet high. You can assume a chair is 3.4 feet high. You will output how tall or high would a person be if they stood on 3 stools that are balancing on top of two chairs.
Hello Dennis Hunchuck.
Your weight is 220.0.
Your height is 6.0.
Based on your exercise you should now weigh 999
If you balance on the stools and chairs you would be 999 feet high.
[INPUT: first name, last name, height, weight, and the number of days he or she went running.]
SUBMISSION:
You are to write a Python Source Document(s).
You are to write a design tool (you pick which tool).
You are to attach to this thread your source document.
You are to attach to this thread your source code document.
Note: Comments within your source code is not a design tool.
SOURCE CODE IN PYTHON:
#input
firstName=input('Enter your first name: ')
lastName=input('Enter your last name: ')
weight=float(input('Enter your weight: '))
height=float(input('Enter your height: '))
days=int(input('How many days did you run? '))
#processing
newWeight=weight-(days*0.5)
newHeight=height+(3*1.5)+(2*3.4)
#output
print()
print('Hello', firstName, lastName)
print('Your weight is', weight)
print('Your height is', height)
print('Based on your exercise you should now weigh', newWeight)
print('If you balance on the stools and chairs you would be',newHeight, 'feet high')
OUTPUT:
Regards!