Page 1 of 1

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

Posted: Thu Jun 02, 2022 8:26 am
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.