subject

Help!! So I need some help with programming (python)

Here's my code:
import itertools
def sumOfLargest(a1, a2, a3):
a1 = [int(x) for x in a1.split()]
a2 = [int(x) for x in a2.split()]
a3 = [int(x) for x in a3.split()]
print(sum(map(max, itertools. zip_longest(a1, a2, a3, fillvalue=0
if __name__ == '__main__':

a1 = input()

a2 = input()

a3 = input()

But I get this error:

Traceback (most recent call last):
File "Solution. py", line 34, in
result = sumOfLargest(a1, a2, a3)
File "Solution. py", line 24, in sumOfLargest
print(sum(map(max, itertools. zip_longest((a1,a2,a3), fillvalue=0
TypeError: unsupported operand type(s) for +: 'int' and 'list'

Does anyone know why? Or how to fix it?

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 14:20, jeffcarpenter
Once starbucks had established its presence in thousands of cities internationally, the company sought to increase the number of purchases by existing customers with a strategy that led to new in-store merchandise, including compilation cds and high-speed wireless access.
Answers: 1
image
Computers and Technology, 22.06.2019 09:50, brennarfa
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
image
Computers and Technology, 22.06.2019 11:10, lberman2005p77lfi
The total cost of textbooks for the term was collected from 36 students. create a histogram for this data. $140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285 $285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320 $330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
Answers: 2
image
Computers and Technology, 22.06.2019 14:30, camerondillonn
If the polar bear were taken out of the food chain what would happen to the seal population the seal population would diminish the seal population would grow dramatically the seal population would stay the same the seal population would decrease slightly
Answers: 1
You know the right answer?
Help!! So I need some help with programming (python)

Here's my code:
import itert...

Questions in other subjects:

Konu
English, 24.11.2020 19:10
Konu
Mathematics, 24.11.2020 19:10
Konu
Biology, 24.11.2020 19:10