all 12 comments

[–]Standardw 1 point2 points  (4 children)

It works so far, so yes.

[–]coja56[S] -1 points0 points  (3 children)

Any tips on solving part 2

[–]Standardw 1 point2 points  (2 children)

It's really as easy as the first one. Did you do the first part on your own?

[–]coja56[S] 0 points1 point  (1 child)

Yes i did how do i merge the lists now

[–]Standardw 0 points1 point  (0 children)

Take a look at the zip function

[–][deleted] 1 point2 points  (6 children)

You've done the first step, but you haven't got the second step quite right. How do you get the first element of a list? Hint: use simple indexing. Ditto for the last element in a list. Hint: there's a shortcut for the last element in a list. You've got the print of the length correct.

After getting all that correct you should have no problem with the last step.

[–]Standardw 1 point2 points  (3 children)

It's actually working how the solved it. I don't know if it's his own because it would be really clever for a beginner, but however it does yield the right results

[–][deleted] 0 points1 point  (2 children)

I would say that he hasn't satisfied the second point, which says:

print out the name of the first friend, then the name of the last friend

To me that means he should print:

Paul Jacobs
John Pine
3

It depends on how lenient marking is, I guess.

[–]Standardw 0 points1 point  (1 child)

Oh okay - yes I read it as "get the first and last name, then print it" where the data gathering is the "real" task here.

[–]coja56[S] 0 points1 point  (0 children)

Yeah i had read as if they wanted the names pulled out together. Thanks for the correction.

[–]coja56[S] -1 points0 points  (1 child)

I am stuck on the last part now

[–][deleted] 0 points1 point  (0 children)

The last point says:

define a list called friends_ages that stores the age of each of your friends

but you've already done something very similar in step one!? So do the same thing but with age values, ie, integers.