Ram studies at a boys’ college and his team at college is planning to organize a farewell party for their seniors. Ram wants to develop an application to generate a welcome message to each senior on the screen when they enters senior’s name. Help Ram to perform this task by creating module in Python.
- Create a module called “greet.py” which contains :
1. A message variable that contains the message “Hello”
2. A function ‘greet(name)’should take a string as the parameter and should print that name along with a greeting message.
3. A documentation string : “””Module for Greeting”””
- Call this documentation string, functions and message variable by importing the greet module. Refer the sample input and output statements for more details.
Sample input statement:
Enter the senior’s name: Rahul
Sample output statement:
Hello Mr.Rahul, Welcome to the farewell Party!!!
Documentation string: Module for Greeting
import greet n=input("Enter the senior's name: ") greet.greet(n)
def greet(name): print(message+" Mr."+name+", Welcome to the farewell Party!!!") print("Documentation string: Module for Greeting") message="Hello"
keep it blank