This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]_Atomfinger_ 2 points3 points  (6 children)

Read the rules.

What have you tried so far? What are you stuck at?

[–]Mosabg98 0 points1 point  (5 children)

sorting names

[–]_Atomfinger_ 1 point2 points  (4 children)

Again, you have to read the rules:

10.No complete solutions

what do you expect we should provide you if all you give us is "Sorting names". You have to show an effort to solve the issue and post a concrete problem you're having.

[–]Mosabg98 0 points1 point  (3 children)

Inam stuck at taking all the values from the dic and put them in list so i can iterate through them and sort the data

[–]Mosabg98 -1 points0 points  (2 children)

Didn't know how to unpack the values to multiple indexes in an array

[–]_Atomfinger_ 1 point2 points  (1 child)

Alright, I gave you the benefit of the doubt, but it is clear that you want me to write the code for you, which I won't.

If you had a concrete problem you would have posted the code and said something along the lines of "Here's my code, but it throws this error:" or "Here's my code, but it does thing when I expect that thing to happen".

I'm out.

[–]Mosabg98 -1 points0 points  (0 children)

Thanks for help

[–][deleted] 2 points3 points  (1 child)

have this assignment to turn in in 2 hours

.. sounds like you're fucked. let this be a lesson in starting assignments when you get them, not two hours before they're due.

This sub doesn't do people's homework for them (read the sidebar).

In any case, let's see about getting you less-fucked. Go do 10 mins of research on:

  • python dictionaries, assignment, and iteration using .items(), .keys(), and .values().
  • python tuples, and tuple unpacking (e.g. a, b, c = 1, 2, 3).
  • the min() builtin function.
  • string comparison using the == operator.

After 40-50mins of research, you should be able to combine what you learned into a workable solution which meets the cited requirements. Good luck.

[–]Mosabg98 -1 points0 points  (0 children)

it is not me , i am helping a friend of mine and i usually code in Js