0
What's wrong with my code
5 Respostas
+ 2
Thank you
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
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")