Question: 1) You're exploring Python modules. Create a Python program called greet.py that uses a module to greet a user. In a new Python file
1) You're exploring Python modules. Create a Python program called greet.py that uses a module to greet a user. In a new Python file called greet.py, define a function named greet_user(name) that takes a user's name as an argument and prints a greeting message like "Hello, [name]!". Create a separate Python file called main.py. In main.py, import the greet_user function from greet.py. Use the imported greet_user function to greet yourself by passing your name as an argument to the function. Run main.py to execute the greeting.
Step by Step Solution
3.48 Rating (148 Votes )
There are 3 Steps involved in it
To create the greetpy and mainpy files with the described functio... View full answer
Get step-by-step solutions from verified subject matter experts
