Computer Science Programming Help

timer Asked: Feb 5th, 2016

Question description

Your lease is up and it’s time to move.  Unfortunately, you have a lot of stuff and you don’t want to spend too much time moving it because you’d rather be practicing your programming skills.  Thankfully, you have friends who can help, though this help comes at a cost.  Your friends can move 20 boxes an hour, but they require one 16 inch (diameter) pizza for this work.  Write a function in Python that takes the number of boxes you have and returns how much square feet of pizza you will have to buy.  Use the function header:


and have it return the square feet of pizza as a float.  Assume that the pizzas are perfectly round and that your friends require a full pizza even if they only work a partial hour.  (In case you’ve forgotten your geometry, the area of a circle is pi*r^2.  Use 3.14159 for pi.)

The code that I have so far is:

def sqFtPizza(numBoxes):

    area = 3.14159*(8*8)

    conversion = (1/12)*2

    areaFt = area * conversion 

    pizzas = numBoxes/20

    totalArea = pizzas*areaFt

    return totalArea

Tutor Answer

(Top Tutor) Studypool Tutor
School: Duke University
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors