Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 24 Online
OpenStudy (anonymous):

If I have this tuple or list and I'd like to write a loop that would scan every letter in a cell, and compare it with x, and if it matches, print the int in the same cell .. ? SCRABBLE_LETTER_VALUES = { 'a': 1, 'b': 3, 'c': 3, 'd': 2, 'e': 1, 'f': 4, 'g': 2, 'h': 4, 'i': 1, 'j': 8, 'k': 5, 'l': 1, 'm': 3, 'n': 1, 'o': 1, 'p': 3, 'q': 10, 'r': 1, 's': 1, 't': 1, 'u': 1, 'v': 4, 'w': 4, 'x': 8, 'y': 4, 'z': 10 }

OpenStudy (anonymous):

'fraid i don't understand what kind of cell are you are talking about? something like this? for letter in cell: print SCRABBLE_LETTER_VALUES[LETTER]

OpenStudy (anonymous):

much like bwCA I don't understand your question entirely, do you mean something like http://dpaste.com/552951/? or perhaps something like this http://dpaste.com/552952/?

OpenStudy (anonymous):

got the idea never mind !: P

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!