1. Write a python program to generate a function to double a specified number.
The output is:
Specified number: 27.2
Expected Answer:
The double number of 27.2 = 54.4
Sample Answer:
def double_number(n): return lambda x : x * n result = double_number(2) print("The double number of 27.2 =", result(27.2))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)