Question: python Question 1: There are 5 parts to this question. Write the following functions. Q1a. Function name question_1a Parameter(s) argument(s) In this order, 1. a
python



Question 1: There are 5 parts to this question. Write the following functions. Q1a. Function name question_1a Parameter(s) argument(s) In this order, 1. a str 2. a str Return value A str Detailed description Concatenate the first str parameter and the second str parameter, with the first str parameter in front. Return the concatenated str Example usage question_la("Coronavirus", "is also known as Covid-19") Example's return "Coronavirusis also known as Covid-19" value Q1b. Function name question_1b Parameter(s) argument(s) In this order, 1. a list 2. a list Return value A str Detailed description Add the contents of the second list to the back of the first list. The contents of the lists can be of any data type. Example usage question_16(["BBIBP-Corv", "Sputnik", "Pfizer-BioNTech"], [["Moderna", 0.94], True]) ["BBIBP-Corv", "Sputnik", "Pfizer-BioNTech", ("Moderna", 0.94], True] Example's return value Q1c. Function name question_10 Parameter(s) argument(s) In this order, 1. a list 2. an object of any type, item Return value 1. An integer Detailed description If the second parameter, item, exists in the first list parameter, return the index of the first occurrence of the item found in the given list. If it does not, retum-1 Example usage question_1c( ["BBIBP-CorV", "Sputnik", "Pfizer- BioNTech", ("Moderna",0.94], True], "Moderna") Example's return-1 value Q1d. Function name question_id Parameter(s) argument(s) 1. a str Error handling Function should raise an exception. The type of exception raised is described below Return value No return values Detailed description Using the str parameter as the error message, raise a ValueError. Q1e. Function name question_le Parameter(s) argument(s) In this order, 1. an integer, X 2. an integer, N Return value A list of integers Detailed description return a list of N number of x Example usage question_le(15,3) Example's return value [15,15,15]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
