8th Mar 2020, 6:28 AM
Xvitrix
5 Respostas
+ 2
Thank you
8th Mar 2020, 7:09 AM
Xvitrix
0
I was trying to solve this question You are trying to determine which of two apartments has a larger balcony. Both balconies are rectangles, and you have the length and width, but you need the area. Task Evaluate the area of two different balconies and determine which one is bigger. Input Format Your inputs are two strings where the measurements for height and width are separated by a comma. The first one represents apartment A, the second represents apartment B. Output Format: A string that says whether apartment A or apartment B has a larger balcony. Sample Input '5,5' '2,10' Sample Output Apartment A
8th Mar 2020, 7:01 AM
Xvitrix
0
A = [input(), input()] B = [input(), input()] x = int(A[0]) y = int(A[1]) g = int(B[0]) h = int(B[1]) areaA= x*y areaB= g*h if areaA > areaB: print("Apartment A") else: print("Apartment B")
9th Mar 2020, 6:34 PM
Zoe Petrovskaya
Zoe Petrovskaya - avatar