In Python, we commonly use functions to execute a block of reusable code. You have a simple function to greet a user whose name is provided as an argument. Your goal is to invoke the function 'greet_user' with the argument 'name' storing a string 'Bob' and assign its return value to a variable 'message'. Later, the 'message' should be printed. Can you fill the blanks in the code to accomplish this task?
Invoking functions
Greeting a user with a function
Report a typo
Fill in the gaps with the relevant elements
def greet_user(name):
"Hello, " + name + "!"
name = "Bob"
message = greet_user(name)
(message)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.