0% found this document useful (0 votes)
656 views8 pages

Pcap 31 03

This document provides sample questions and answers related to the PCAP-31-03 certification exam. It includes 50 multiple choice questions covering topics like Python programming, classes, exceptions, imports, and more. Each question includes the question text, possible answers, and an explanation for the correct answer. The document aims to help exam takers prepare for the PCAP-31-03 exam by providing real exam-style questions and explanations to learn from.

Uploaded by

cannovala
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)
656 views8 pages

Pcap 31 03

This document provides sample questions and answers related to the PCAP-31-03 certification exam. It includes 50 multiple choice questions covering topics like Python programming, classes, exceptions, imports, and more. Each question includes the question text, possible answers, and an explanation for the correct answer. The document aims to help exam takers prepare for the PCAP-31-03 exam by providing real exam-style questions and explanations to learn from.

Uploaded by

cannovala
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/ 8

PCAP-31-03 Dumps

PCAP-31-03 Braindumps
PCAP-31-03 Real Questions
PCAP-31-03 Practice Test
PCAP-31-03 dumps free

AICPA

PCAP-31-03
Certified Associate in Python Programming - 2022

http://killexams.com/pass4sure/exam-detail/PCAP-31-03
Question: 38
What is the expected output of the following code?

A. 3
B. 5
C. 4
D. an exception is raised

Answer: A

Question: 39

What is the expected output of the following code?

def foo(x,y,z):

return x(y) – x(z)

print{f00(lambda x: x % 2, 2, 1) )
A. 1
B. 0
C. -1
D. an exception is raised

Answer: C

Question: 40

Assuming that the following code has been executed successfully, selected the expression which evaluate to True
(Select two answers)
A. a ( ) == 4
B. a is not None
C. b ( ) == 4
D. a ! = b

Answer: A,B

Question: 41

What can you do if you don’t like a long package path like this one?

A. you can make an alias for the name using the alias keyword
B. nothing, you need to come to terms with it
C. you can shorten it to alpha. zeta and Python will find the proper connection
D. you can make an alias for the name using the as keyword

Answer: D

Explanation:

Reference: https://stackoverflow.com/questions/706595/can-you-define-aliases-for-imported-modules-in-python

Question: 42

Which of the following expression evaluate to True? (Select two answers)


A. len(”•) == 1
B. len("""
""") == o
C. chr(ordCA’) + 1) == ‘B’
D. ord("Z") – ord("z") — ord("0")

Answer: B
Question: 43

The__bases__property contains:
A. base class locations (addr)
B. base class objects (class)
C. base class names (str)
D. base class ids (int)

Answer: C

Question: 44

What is the expected output of the following snippet?

A. 3
B. 1
C. 2
D. the code is erroneous

Answer: A

Question: 45

A variable stored separately in every object is called:


A. there are no such variables, all variables are shared among objects
B. a class variable
C. an object variable
D. an instance variable

Answer: D

Explanation:

Reference: https://dev.to/ogwurujohnson/distinguishing-instance-variables-from-class-variables-in-python-81
Question: 46

What is the expected behavior of the following code?

A. it outputs 2
B. the code is erroneous and it will not execute
C. it outputs 1
D. it outputs 3

Answer: A

Question: 47

Assuming that the code below has been executed successfully, which of the following expressions evaluate to True?
(Select two answers)
A. ‘var’ in Object.__dict__
B. ‘prop’ in Class.__dict
C. len(Object.__diet__) == 1
D. ‘var1 in Class, dict

Answer: A,C

Question: 48

The following expression

1+-2

is:
A. equal to 1
B. invalid
C. equal to 2
D. equal to -1

Answer: D

Question: 49

If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:
A. except Ex1 Ex2:
B. except (ex1, Ex2):
C. except Ex1, Ex2:
D. except Ex1+Ex2:

Answer: D

Question: 50

With regards to the directory structure below, select the proper forms of the directives in order to import module_a.
(Select two answers)
A. import pypack.module_a
B. import module_a from pypack
C. import module_a
D. from pypack import module_a

Answer: A,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