PCAP-31-03 Exam QuestionsBrowse all questions from this exam

PCAP-31-03 Exam - Question 50


Which of the following expressions evaluate to True? (Choose two.)

Show Answer
Correct Answer: AC

The expressions that evaluate to True among the options are correctly 'A' and 'C'. For option 'A': 'dcb' not in 'abcde'[::-1], 'abcde'[::-1] reverses the string to 'edcba', and 'dcb' is indeed not found in 'edcba', so the expression evaluates to True. For option 'C': str(1-1) in '0123456789'[:2], the expression '1-1' results in 0, and str(0) is '0'. '012' is the first two characters of the string '0123456789', thus '0' is in '01', making the expression true.

Discussion

2 comments
Sign in to comment
DKAT2023Options: BC
Jul 12, 2024

B and C are corrects

kstrOptions: BC
Jul 12, 2024

BC CORRECT