Home »
MCQs »
Python MCQs
Once we have defined a function, we can call it?
53. Once we have defined a function, we can call it?
- True
- False
Answer: A) True
Explanation:
Once a function has been defined, it can be called from another function, a program, or even from the Python prompt itself. To call a function, we simply type the name of the function followed by the appropriate parameters into the command line.
For example-
def user_name(name):
# This function greets to user
# to put name
print("Hello, " + name + ".")
user_name("Amit") # Amit passed as function argument
# Output: Hello, Amit.