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

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

Assuming that the snippet below has been executed successfully, which of the following expressions evaluate to True? (Choose two.) string = 'python'[::2] string = string[-1] + string[-2]

  • A. string[0] == 'o'
  • B. string is None
  • C. len(string) == 3
  • D. string[0] == string [-1]
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
macxsz
Highly Voted 2 years, 7 months ago
A is the only True
upvoted 16 times
petibi
2 years, 6 months ago
hello, is your PCAP exam done?
upvoted 3 times
andr3
1 year, 8 months ago
is yours ?
upvoted 2 times
Veilok
1 year, 3 months ago
is yours?
upvoted 2 times
...
...
...
...
Damon54
Most Recent 9 months, 2 weeks ago
A. string[0] == 'o' C. len(string) == 3
upvoted 1 times
Damon54
9 months, 2 weeks ago
No correct
upvoted 1 times
...
...
Damon54
9 months, 3 weeks ago
Maybe that's the case, I ask whoever took the exam to explain Assuming that the snippet below has been executed successfully, which of the following expressions evaluate to False? (Choose two.) string = 'python'[::2] string = string[-1] + string[-2] string = 'python'[::2] string = string[-1] + string[-2] print (string[0] == 'o') print (string is None ) print (len(string) == 3) print (string[0] == string [-2]) True False False True
upvoted 3 times
moteruky
9 months, 2 weeks ago
String [-1] + string[-2] gives ot Print(string [0]==o TRUE String[0]==String [-2]
upvoted 1 times
...
...
seaverick
10 months, 1 week ago
#question 2 string = 'python'[::2] string = string[-1] + string[-2] print(string) print(string[0]) print(len(string)==3)#False print(string is None)#False print(string[0]==string[-1])#False print(string[0]=='o')#True Tested: A (string[0]=='o)
upvoted 1 times
...
clecorre
1 year, 3 months ago
Hello everybody, my PCAP is set for next Monday. I see many errors in these exercises, and I'm very worried. Is the (real) exam full of errors like this ?
upvoted 1 times
brandonkim76
1 year, 2 months ago
how did it go?
upvoted 1 times
...
...
andr3
1 year, 8 months ago
Selected Answer: A
once snippet executes we are left with "'ot" only
upvoted 1 times
...
Mallie
1 year, 11 months ago
Selected Answer: A
Only A is correct
upvoted 1 times
...
Jnanada
2 years, 3 months ago
only A is true
upvoted 1 times
...
stuartz
2 years, 5 months ago
Selected Answer: A
only A because >>> 'python'[::2] 'pto' >>> string = 'python'[::2] >>> string 'pto' >>> string = string[-1] + string[-2] >>> string 'ot' >>> string[0] 'o' >>> string[-1] 't'
upvoted 1 times
...
cvvvv
2 years, 6 months ago
A is the correct answer.
upvoted 3 times
...
carpmatias
2 years, 6 months ago
Shouild be A: >>> string = 'python'[::2] >>> string 'pto'
upvoted 2 times
...
petibi
2 years, 6 months ago
Yes only A is True
upvoted 4 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 ...