Multiple Lists


Tell me if this course doesn't have the dumbest instructions I have ever seen on codeacademy.

so the instruction says
Compare each pair of elements and print the larger of the two.

list_a = [3, 9, 17, 15, 19]
list_b = [2, 4, 8, 10, 30, 40, 50, 60, 70, 80, 90]

first thing that comes to your mind is length length length
because you see two lists and it tells you the print the largest. I've spent an hour of coding before i couldn't take it anymore and looked at the answer.

no its literally talking about larger like a > b. Did i feel dumb as ■■■■ yea but I've spent MIT level coding trying to get this thing right and this isn't the only one I've had issues with. I CANNOT WAIT FOR THE NEW PYTHON COURSE! who else is with me.


a Link to the exersice would always be useful, but I find it.

You must use a For- loop (with zip) and after it the other stuff is pure simpleness.

The syntax for the loop is

For x, y in zip(example_list, another_one):

and then the if statements, that should check that witch list (wink wink) is larger.
I hope that this was useful!


I guess my only problem with this course is the way the instructions are written. Some are really hard to understand although they're really asking for something very simple. in the exercise above there are 2 lists one small one large, so it says print the larger of the two, but what its really saying is print the larger number in the list out of the two lists ascending.


It's propably a part of the course's idea.

But anyway, in this lesson the zip() method is used to build a for loop with two lists, so using it makes thigs alot of faster.
Did you got the idea?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.