68 382
Assignments Done
Successfully Done
In November 2018

Answer to Question #58778 in Python for Elvis Tavarez

Question #58778
When building an enclosure for a python the amount of area at the base of the enclosure should be proportionate to the length of the snake. The minimum needed is 1/2 square foot for each foot in length up to and including 6 and 3/4 square foot for each foot after that. e.g. 9' python needs 5.25 square feet (6 * ½ + 3 * ¾)
Create a program that asks the user how long their python is and tell them the minimum area they need for the base of its enclosure.
Expert's answer
ask = input('How long is your python: ')
a = 0.0

if int(ask) <= 6:
a += float(ask)*1/2
a += 3
a += (float(ask) - 6)*3/4


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions