0

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?

19th Jul 2023, 11:13 AM
Тимоки
7 Respostas
+ 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.
19th Jul 2023, 12:00 PM
Lisa
+ 7
Тимоки , To get elements in a row...you can use map function... Try like this, https://code.sololearn.com/cHw1dBIhKlGr/?ref=app
19th Jul 2023, 11:22 AM
Riya
+ 6
Тимоки , This is task description... Can you show your attempted code??
19th Jul 2023, 11:34 AM
Riya
+ 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
19th Jul 2023, 11:26 AM
Rik Wittkopp
+ 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.
19th Jul 2023, 11:19 AM
Darpan kesharwani🇮🇳[Inactive📚]
+ 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
19th Jul 2023, 11:32 AM
Тимоки
0
I deleted it, cause of anger)
19th Jul 2023, 11:35 AM
Тимоки
Quente hoje
HELP ME