0
Q about str
How to multiply row elements by each other? Example: a = str (input()) # maybe it wood be "5, 5", so i want to make 5 * 5 = 25, how can i do this?
7 Respuestas
+ 4
split the string by the separator, e.g. x = "1,2".split(",")
You get a list of strings. Convert each element to integer and multiply the elements.
+ 7
Тимоки ,
To get elements in a row...you can use map function...
Try like this,
https://code.sololearn.com/cHw1dBIhKlGr/?ref=app
+ 6
Тимоки ,
This is task description...
Can you show your attempted code??
+ 3
Тимоки
There are many ways to do this, but each method is dependant on how the input string is presented.
If you could provide a code example of your input, we may be able to show how to create your desired output
+ 2
Тимоки
This platform is not available to provide ready code. So try by yourself.
If you face any problems in during making code then ask here.
+ 2
Rik Wittkopp,
Balconies
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
I deleted it, cause of anger)