https://builtin.com/software-engineering-perspectives/arguments-in-python
Keyword arguments should follow positional arguments only.
def add(a,b,c):
return (a+b+c)
The above function can be called in two ways:
First, during the function call, all arguments are given as positional arguments. Values passed through arguments are passed to parameters by their position. 10 is assigned to a, 20 is assigned to b and 30 is assigned to c.
print (add(10,20,30))
#Output:60
The second way is by giving a mix of positional and keyword arguments. Keyword arguments should always follow positional arguments.
print (add(10,c=30,b=20))
#Output:60
This section is not available anymore. Please use the main Exam Page.PCAP Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Avidulam
Highly Voted 5 years, 4 months agoRajdeep
Highly Voted 5 years, 3 months agoseaverick
Most Recent 1 year, 5 months agoSheilaM
2 years, 4 months agoekossov
2 years, 7 months agomacxsz
3 years, 2 months agoSpectra
4 years, 10 months ago