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 8 discussion

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

How many lines does the following snippet output?

  • A. three
  • B. one
  • C. two
  • D. four
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Tarun1
Highly Voted 4 years, 8 months ago
its one line
upvoted 26 times
...
Avidulam
Highly Voted 4 years, 8 months ago
It prints only in one line
upvoted 11 times
...
46a1b89
Most Recent 1 month, 3 weeks ago
the answer is D there is nno break after for / print lol
upvoted 1 times
...
IshanKarpe
4 months, 2 weeks ago
Selected Answer: A
Three lines, elseincluded
upvoted 1 times
...
IshanKarpe
4 months, 2 weeks ago
Stop Lying. IT DOES NOT PRINT 1, IT PRINTS THREE BC OF ELSE STATEMENT> TRIED AND TESTED
upvoted 1 times
...
86b907f
5 months, 2 weeks ago
Selected Answer: B
Only one line ...
upvoted 1 times
...
Dempsdawg
8 months, 1 week ago
Selected Answer: B
Answer is B
upvoted 1 times
...
peypa
8 months, 2 weeks ago
Selected Answer: C
range Starts at 1 and ends at 2
upvoted 2 times
...
mplopez
1 year, 4 months ago
It only works the for loop, the else part is no needed in this case because you didn't have any way to take.
upvoted 2 times
...
mplopez
1 year, 4 months ago
Selected Answer: A
The correct answer is A. The snippet returns ***.
upvoted 3 times
...
CristianCruz
1 year, 4 months ago
Selected Answer: D
answer is D
upvoted 1 times
...
Dinsha
1 year, 8 months ago
Selected Answer: B
The * will print in one line
upvoted 1 times
...
spiderking123
1 year, 8 months ago
Selected Answer: B
Answer is one line
upvoted 1 times
...
naveenbv80
1 year, 11 months ago
for i in range (1,3): print("*", end="") else: print("*") Answer is ***
upvoted 3 times
...
N9
2 years, 2 months ago
Selected Answer: B
3 stars in one line
upvoted 6 times
...
besha
2 years, 4 months ago
Selected Answer: B
one line and 3 stars
upvoted 1 times
...
Suvabrata
2 years, 5 months ago
A is correct...It will print ***
upvoted 1 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 ...