• Chico: 50%
  • Groucho: 70%
  • Harpo: 50%
  • Zeppo: 40%

TRY IT YOURSELF

ANSWER

https://colab.research.google.com/drive/1GpnAi4qf3-4MwcQLDf3l0XkEhkdnSx3A?usp=sharing

  • gematria_for, which takes a single word (string) as an argument and returns the gematria score for that word
  • gematria_equal_words, which takes a single word and returns a list of those dict words whose gematria scores match the current word’s score.

TRY IT YOURSELF

ANSWER

https://colab.research.google.com/drive/1Q1mSrNqWv3emIuKJGaNZRqdjhzjCvm1L?usp=sharing

d = {'a':1, 'b':2, 'c':3}
transform_values(lambda x: x*x, d)
{'a': 1, 'b': 4, 'c': 9}

TRY IT YOURSELF

ANSWER

https://colab.research.google.com/drive/1mMSA15oho51J9XTmfNbrE5GEdtbFJPiU?usp=sharing

Input: a = [6, 11, 8], b = [10, 34, 22]
Output: [6, 8, 10, 11, 22, 34]

TRY IT YOURSELF

ANSWER

This question tests our understanding of Python and its Data Structures. On the surface it looks difficult but if you are familiar with Python syntax this is very easy.

def MergeSort(list1, list2):
ans = list1+list2
ans.sort()
return ans

Abish Pius

Data Science Professional who teaches with unflashy, simple to understand python code.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store