[SOLVED] Programming Exercise 3-1

$25

File Name: Programming_Exercise_3-1.zip
File Size: 226.08 KB

5/5 - (1 vote)

Programming Exercise 3-1

Programming Exercise 5-10

# main function

def main():

# Local variables

feet = 0.0

inches = 0.0

# Get the number of feet from the user.

feet = float(input(Enter the number of feet: ))

# Display the corresponding number of inches.

inches = feet_to_inches(feet)

print (feet, feet =, inches, inches)

# The feet_to_inches function receives the number of

# feet and returns the number of inches in that many

# feet.

def feet_to_inches(feet):

return 12 * feet

# Call the main function.

main()

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Programming Exercise 3-1
$25