Course Hero Logo

PCAP-31-02.pdf - CPP-Institute PCAP-31-02 PCAP Certified...

Doc Preview
Pages 4
Identified Q&As 6
Solutions available
Total views 23
PCAP-31-02CPP-InstitutePCAP Certified Associate in Python Programming
QUESTION:35A file name like this one below says mat: (select three answers) services. cpython-36.pyc
View full document
QUESTION:36You are going to read just one character from a stream called s. Which statement wouldyou use?
View full document
QUESTION:37Assuming that String is six or more letters long, the following slice String[1:-2] is shorterthan the original string by:
View full document
QUESTION:38
What is the expected behavior of the following snippet9 def x() : #line 01
Course Hero Badge

End of preview

Want to read all 4 pages? Upload your study docs or become a member.

Unformatted text preview: return 2 f line 02 x = 1 + x() #line 03 print(x) f#line 04 It will: A. cause a runtime exception on line 02 B. cause a runtime exception on line 01 C. cause a runtime exception on line 03 D. print3 Answer: D QUESTION: 39 What would you use instead of XXX if you want to check whether a certain key' exists in a dictionary called diet? (Select two answers) if XXX: print("Key exists") A. 'key' in diet B. diet['key'] != None C. diet.exists('key') D. 'key' in diet.keys() Answer: B, D QUESTION: 40 What will the valueof the i variable be when the following loop finishes its execution? for i in range(10): pass A. 10 B. the variable becomes unavailable C. 11 D. 9 Answer: D For More exams visit http s ://killexams.com /vendors-exam-list Kill your exam at First Attempt .... Guaranteed!...
View Full Document