*Please do all of them and following the instructions* Language Python Upload hw3.py file with the functions below and

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

*Please do all of them and following the instructions* Language Python Upload hw3.py file with the functions below and

Post by answerhappygod »

*Please do all of them and following the instructions*
Language Python

Upload hw3.py file with the functions below and a test driver in
main():
Q1 (1pt). Write a function that given a
list of strings counts the number of strings with the same
first and last character. Do not include empty
strings.
Example: problem1(['abba', 'beatles', 'gig', 'sun']) =>
2
Q2 (1pt). Write a function, that given
list1 and list2 returns a new list with items from list1 that do
not appear in list2.
Example: problem2(['hello', 'world', 2021], ['world']) =>
['hello', 2021]
Q3 (1pt). Write a function that given a
list and a number n returns a list of words that have at most
n characters.
Example: problem3(['world', 'sun', 'happy', 'moon', 'Alfred'],
4) => ['sun', 'moon']
Q4 (1pt). Write a function min_nested_sum
that will return a minimum sum from a list of lists.
Example: min_nested_sum([[-5, 43], [4, 75], [53]]) =>
38.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply