Python Programming - Functions - Discussion
Discussion Forum : Functions - General Questions (Q.No. 40)
40.
What will be the output of the following code snippet?
def greet(name="User"):
return f"Hello, {name}!"
message = greet()
print(message)
Answer: Option
Explanation:
The default value for the parameter
name
is "User," so if no argument is provided, it uses the default.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers