Suppose you are creating a simple Python application that greets the user. You decided to encapsulate the greeting function in a separate Python script as it is used across the application. Fill in the blanks in the code to import and call the greeting function correctly from another Python script.
Implementing and calling a greeting function
Report a typo
Fill in the gaps with the relevant elements
# greeter.py
greet(name):
f"Hello, {name}!"
# main.py
greeter
print(greeter.greet("World")) ___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.