Python: select the correct answer
def translate_words (words):
table = {'bir': 'one', 'eki': 'two', 'ush':'three','tort':
'four', 'bes':'five','alty':'six', 'zheti':'seven',
'segiz':'eight','togyz':'nine'}
ans = [] for word in table: if (table.get(word)):
ans.append(table [word]) return ans
Оставшееся время 0:49:26 Fill in the empty spaces in the code below. The code should implement a function for turning the list of words in Kazakh language into their translation in English. Example: ['bir', 'eki''ush'] Output: ['one', 'two, 'three'] def translate_words (words): table = { 'bir': 'one', 'eki': 'two', 'ush':'three, 'tort': 'four', 'bes':'five','alty':'six', 'zheti':'seven', 'segiz':'eight','togyz':'nine' } ans = [] for word in table if table.get (word) return ans words words.split('') word in table table.contain (word) ans.append (table [word]) ans.append (word) ans.append (table.find (word))
Python: select the correct answer def translate_words (words): table = {'bir': 'one', 'eki': 'two', 'ush':'three','tort'
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Python: select the correct answer def translate_words (words): table = {'bir': 'one', 'eki': 'two', 'ush':'three','tort'
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!