Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam PCAP topic 1 question 62 discussion

Actual exam question from Python Institute's PCAP
Question #: 62
Topic #: 1
[All PCAP Questions]

A method for passing the arguments used by the following snippet is called:

  • A. sequential
  • B. named
  • C. positional
  • D. keyword
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Avidulam
Highly Voted 4 years, 1 month ago
Thee answer is C, its positional.
upvoted 25 times
...
Rajdeep
Highly Voted 4 years, 1 month ago
Its C- Positional
upvoted 6 times
...
seaverick
Most Recent 2 months, 3 weeks ago
Selected Answer: C
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
upvoted 1 times
...
SheilaM
1 year, 1 month ago
C , it’s positional
upvoted 1 times
...
ekossov
1 year, 4 months ago
The answer is correct. it is positional
upvoted 1 times
...
macxsz
1 year, 11 months ago
Selected Answer: C
C. positional
upvoted 1 times
...
Spectra
3 years, 7 months ago
Its positional
upvoted 2 times
...
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.

SaveCancel
Loading ...