Coad coach balconies problem | Sololearn: Learn to code for FREE!

+4

Coad coach balconies problem

https://www.sololearn.com/coach/24?ref=app Has anyone completed this and will show me? Having a tough time visualizing how the two inputs work sorry

5/1/2020 8:03:47 PM

Brenner Pieszak

3 Answers

New Answer

+2

Hello Brenner Pieszak I am sure you can do it by your own. :) Can you explain your problem? Are you not familiar with user input in general or not with multiple user input? balconyA = input() balconyB = input() Now you need to find a way to extract the width and heights from each string.

+1

first = str(input()) second = str(input()) first_list = first.split(',') second_list = second.split(',') a = int(first_list[0]) * int(first_list[1]) b = int(second_list[0]) * int(second_list[1]) if a > b: print ('Apartment A') elif b > a: print ('Apartment B')

-1

I tried solving through an array. In C++ code https://code.sololearn.com/c4MgNwu8nUfr/?ref=app