User Profile
Collapse
-
Thanks,that was perfect! -
How can I sort 2 parallel lists in the same way?
Ok,so I have 2 lists with the same lenght.The one has etc. names of students and the other has how many courses a student has passed and these lists ara parallel.I want to sort out the second list so I can find the most courses passed by a student,but how can the first list be sorted in the same way so the right student is shown?Can I use the "sort" method in some way or I have to do a whole different proccess?
Thank you in... -
My demanding is false,I wanted to change the keys of a dict,something that can't be done.I will use lists for my program now.Sorry for your trouble!Leave a comment:
-
huh!Well,yes it does,but just not how i wanted!lol.I want the program to expect a number(0-80) from the user and then show on a "matrix" how many times that number was given!But it appears i am way far from that right now!Anyway,than ks for your time.Leave a comment:
-
thanks for your reply,I changed it to "input" but still doesn't work :/Leave a comment:
-
Dictionary value remains unchanged in "for" loop
Code:k= {} for i in range(0, 101): k[i]=0 for j in range(0, 2): number=raw_input("give number") if number in k: #This part doesn't seem to work k[j]+=1 print k
Thanks in advance!
No activity results to display
Show More
Leave a comment: