Python: select the correct answer def translate_words (words): table = {'bir': 'one', 'eki': 'two', 'ush':'three','tort'

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
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'

Post by answerhappygod »

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
Python Select The Correct Answer Def Translate Words Words Table Bir One Eki Two Ush Three Tort 1
Python Select The Correct Answer Def Translate Words Words Table Bir One Eki Two Ush Three Tort 1 (119.46 KiB) Viewed 22 times
Оставшееся время 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))
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply