Importing modules for greetings and goodbyes

Report a typo

You have two modules, module1 and module2, inside a package called my_package. Fill the blanks in the code to import the modules correctly and print the greeting and farewell messages.

Fill in the gaps with the relevant elements
 my_package.module1  mod1
import my_package.module2 as mod2

name = "John"
age = 25

greeting = mod1.greeting(name)
farewell = mod2.farewell(name, age)

(greeting)
print(farewell)

Create a free account to access the full topic