Question: Suppose you are designing a function that takes the height and width of two images and determines if the first is larger than the second.

Suppose you are designing a function that takes the height and width of two images and determines if the first is larger than the second. Write a full set of examples/tests for the function larger_image assuming that larger means greater in area, where area is defined as height times its width. We have provided you with a signature/purpose/stub.
@typecheck
def larger_image(width1: int, height1: int, width2: int, height2: int)-> bool:
"""
return True if the first image, with height1 and width1 is larger than the
second one with height2 and width2, where larger means being greater in area,
where area is defined as height times width.
"""
return False #stub
Name Type Description
larger_image python function Function, including signature, purpose, and stub

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!