Question: plz answers these short Qs in python language Q1-Write the definition of a function, is_reverse, whose two parameters are arrays of integers of equal size.
plz answers these short Qs in python language
Q1-Write the definition of a function, is_reverse, whose two parameters are arrays of integers of equal size. The function returns true if and only if one array is the reverse of the other. ("Reverse" here means same elements but in reverse order.)
Q2-Assume that print_list is a function that expects one parameter, a list. The function prints the contents of the list; it does not return a value.Assume that inventory is a list, each of whose elements is an int.Write a statement that prints the contents of the list inventory by calling the function print_list
Q3-Given the list names, find the largest element in the list and swap it with the last element. For example, the list ["Carlton", "Quincy" "Adam", "Bernard"] would become ["Carlton", "Bernard", "Adam", "Quincy"]. Assume names is not empty.
Q4-Create a list of the odd numbers between 1 and n (include 1 as well as n -- if it's odd-- in the list). Associate the list with the variable odds.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
