170030920 skilling 5.docx

# 170030920 skilling 5.docx - SKILLING-5 170030920 5 A 3-foot...

• 3

This preview shows page 1 - 3 out of 3 pages.

SKILLING-5 170030920 5) A 3-foot –tall monkey in a room where some bananas are suspended from the 8-foot ceiling. He would like to get the bananas. The room contains two stackable, moveable, climbable 3-foot-high- crates. Write a python program to solve monkey-banana problem. Code: print("enter the height of banana from ground") a=int(input()) print("enter the height of monkey in the room") b=int(input()) print("enter height of the chair") c=int(input()) print("capacity of the monkey to jump") e=int(input()) if a==b: print("monkey can grab bananas") exit(0) elif b+e>=a: print("monkey cannot grab bananas by hand") print("monkey grabbed the bananas by jumping")

Subscribe to view the full document.

• Spring '17

{[ snackBarMessage ]}

###### "Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern