Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 12 (20 points) Write a function named first_Last that takes a single parameter, string_List (a list of strings). The function first_last should return a
Question 12 (20 points) Write a function named first_Last that takes a single parameter, string_List (a list of strings). The function first_last should return a list of the strings in string_List that are not empty and that beg and end with the same letter. For example, the following would be correct input and output for the function first_last. response'to 'that', I say', hurrah' print first_last(response)) ['that', 'I', 'hurrah' Question 13 (20 points) Write a function named number_Luck. The function number_luck takes two parameters: 1. 2. Lucky, a list of lucky numbers between 2 and 12, inclusive unlucky, a list of unlucky numbers between 2 and 12, inclusive Every number is either lucky, unlucky or boring (neither lucky nor unlucky). The function number Luck should ask the user for a number in the range 2 to 12 (you may assume that the user provides valid input) 1. 2Pitura am antegerchals the use' numaer boring For example, the following would be correct input and output. >a_numnumber_luck ([7, 11], [2, 3, 12]) Give me a number from 2 to 12: 7 7 is lucky. You win! >>print (a_num) 7
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started