Complete the code to define a function named greet.
def [1](): print("Hello!")
The function name should be greet to match the instruction.
Complete the code to call the function greet.
[1]()print() instead of the function name.To run the function, you write its name followed by parentheses: greet().
Fix the error in the function definition to accept a name parameter.
def greet([1]): print(f"Hello, {name}!")
The parameter should be named name to match the variable used inside the function.
Fill both blanks to define and call a function that adds two numbers.
def add([1], [2]): return a + b result = add(3, 4)
The function parameters should be a and b to match the addition inside the function.
Fill all three blanks to create a function that returns the square of a number and call it.
def square([1]): return [2] * [3] result = square(5)
The parameter and both operands in the return statement should be the same variable num to correctly calculate the square.
