python
Write a function named get_max_multiples_of_3(sentence) that takes a sentence as a parameter. The sentence contains integers each separated by white space. The function should do the following: • split the sentence into a list of values by calling the split() method • convert the list of values into a list of multiples of 3 • return the maximum value by calling the max () function Note: You can assume that the parameter sentence is not empty and contains at least one multiple of 3 integer. For example: Test Result 30 print (get_max_multiples_of_3('1 2 3 4 5 6 7 8 9 10 -1 -2 15 20 25 30')) print (get_max_multiples_of_3('1 2 3 2 1 6 3 4 5 2')) 6
Write a function named get_max_multiples_of_3(sentence) that takes a sentence as a parameter. The sentence contains inte
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a function named get_max_multiples_of_3(sentence) that takes a sentence as a parameter. The sentence contains inte
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!