Functions are reusable blocks of code that perform a specific task.
def function_name(parameter1, parameter2):
# code here
return result
def greet(name):
return f"Hello, {name}!"message = greet("Alice")
print(message) # Hello, Alice!
Create a function called calculate_total that:
price and quantityTest it by calling the function with price=25 and quantity=4, then print the result.
Run your code to see output