Function Question
Function Question
Q1. Write a program that generates a series using a function which takes first and
last values of the series and then generates four terms that are equidistant e.g., if
two numbers passed are 1 and 7 then function returns 1 3 5 7.
Q2. Write a function that takes two numbers and returns the number that has
minimum one's digit. [For example, if numbers passed are 491 and 278, then the
function will return 491 because it has got minimum one's digit out of two given
numbers (491's 1 is < 278's 8)].
Q3. A function that takes two char argument and returns True if both the
arguments are equal otherwise False.
Q4. Write a program that reads a date as an integer in the format MMDDYYYY.
The program will call a function that prints print out the date in the format , .
Sample run :
Q5. Write a function called remove First that accepts a list as a parameter. It
should remove the value at index 0 from the list.
Q9. Write a function LShift(Arr,n) in Python, which accepts a list Arr of numbers
and n is a numeric value by which all elements of the list are shifted to left.
Sample Input Data of the list Arr= [ 10,20,30,40,12,11], n=2
Output Arr = [30,40,12,11,10,20
Q10. Write a program that generates a series using a function which takes first
and last values of the series and then generates four terms that are equidistant
e.g., if two numbers passed are 1 and 7 then function returns 1 3 5 7.[hint:- find
common difference use A.P. formula, number of term is 4]