Is there any mistake in it to make the test cases to fail?? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

Is there any mistake in it to make the test cases to fail??

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 a = input().split(",") u = 1 t = 1 b = input().split(",") for i in a: u = int(u*int(i)) for j in b: t = int(t*int(j)) if t>u: print("apartment B ") else: print("apartment A ")

23rd Jul 2021, 8:19 AM
Shahir
Shahir - avatar
2 Antworten
+ 2
a = input().split(",") u = 1 t = 1 b = input().split(",") for i in a: u = int(u*int(i)) for j in b: t = int(t*int(j)) if t>u: print("Apartment B ") else: print("Apartment A ") now??
23rd Jul 2021, 8:26 AM
Shahir
Shahir - avatar
+ 1
It's a pro question so I don't know whether it's gonna pass the all test cases
23rd Jul 2021, 8:30 AM
Shahir
Shahir - avatar