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

Exam PCAP All Questions

View all questions & answers for the PCAP exam

Exam PCAP topic 1 question 22 discussion

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

Select the valid fun () invocations:
(Choose two.)

  • A. fun (b=1)
  • B. fun (a=0)
  • C. fun (b=1, 0)
  • D. fun (1)
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
4a348e6
6 months, 3 weeks ago
A is not the correct answer since it needs a or it needs a and b. In A it only shows b which is not applicable to the machine
upvoted 1 times
...
4a348e6
6 months, 3 weeks ago
Selected Answer: BD
You would think it's C but it's not. This is becuase c has a syntax error of writing the b first and then a which is not the order.
upvoted 1 times
...
TheFivePips
11 months, 3 weeks ago
Selected Answer: BD
The only hangup I had was on option C so here is an explanation for people like me: C attempts to pass positional argument 0 after keyword argument b=1, which is not allowed.
upvoted 1 times
...
Monika23
1 year, 7 months ago
Selected Answer: BD
b is an optional parameter so the answer is B and D
upvoted 2 times
...
N9
2 years, 2 months ago
Selected Answer: BD
b is an optional parameter so the answer is B and D
upvoted 2 times
...
macxsz
2 years, 7 months ago
Selected Answer: BD
B. fun (a=0) D. fun (1)
upvoted 2 times
...
swatiexam
2 years, 7 months ago
Why a is correct?
upvoted 1 times
aldo63
1 year, 9 months ago
becoz the given input of b already equals 0, we need input for a so it will yield: a*b
upvoted 1 times
...
...
diazed
2 years, 10 months ago
Those are the correct answers
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 ...