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 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: BC 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
macxsz
Highly Voted 1 year, 11 months ago
A is the only True
upvoted 15 times
petibi
1 year, 11 months ago
hello, is your PCAP exam done?
upvoted 3 times
andr3
1 year ago
is yours ?
upvoted 2 times
Veilok
7 months, 4 weeks ago
is yours?
upvoted 2 times
...
...
...
...
Damon54
Most Recent 2 months ago
A. string[0] == 'o' C. len(string) == 3
upvoted 1 times
Damon54
2 months ago
No correct
upvoted 1 times
...
...
Damon54
2 months, 1 week 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
1 month, 4 weeks ago
String [-1] + string[-2] gives ot Print(string [0]==o TRUE String[0]==String [-2]
upvoted 1 times
...
...
seaverick
2 months, 3 weeks 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
7 months, 3 weeks 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
7 months, 1 week ago
how did it go?
upvoted 1 times
...
...
andr3
1 year ago
Selected Answer: A
once snippet executes we are left with "'ot" only
upvoted 1 times
...
Mallie
1 year, 3 months ago
Selected Answer: A
Only A is correct
upvoted 1 times
...
Jnanada
1 year, 8 months ago
only A is true
upvoted 1 times
...
stuartz
1 year, 10 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
1 year, 11 months ago
A is the correct answer.
upvoted 3 times
...
carpmatias
1 year, 11 months ago
Shouild be A: >>> string = 'python'[::2] >>> string 'pto'
upvoted 2 times
...
petibi
1 year, 11 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 ...