0% found this document useful (0 votes)
58 views4 pages

Pcap 31 02

Uploaded by

Zahid Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views4 pages

Pcap 31 02

Uploaded by

Zahid Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CPP-Institute

PCAP-31-02
PCAP Certified Associate in Python Programming

https://killexams.com/pass4sure/exam-detail/PCAP-31-02
QUESTION: 35
A file name like this one below says mat: (select three answers) services. cpython-36.pyc

A. the interpreter used to generate the file is version 3.6


B. it has been produced by CPython
C. it is the 36th version of the file
D. the file comes from the services .py source file

Answer: A, C, D

QUESTION: 36
You are going to read just one character from a stream called s. Which statement would
you use?

A. ch = read(s, 1)
B. ch = s.input(1)
C. ch = input(s, 1)
D. ch = s.read(l)

Answer: B

QUESTION: 37
Assuming that String is six or more letters long, the following slice String[1:-2] is shorter
than the original string by:

A. four chars
B. three chars
C. one char
D. two chars

Answer: B

QUESTION: 38
What is the expected behavior of the following snippet9 def x() : #line 01
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 https://killexams.com/vendors-exam-list

Kill your exam at First Attempt....Guaranteed!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy