Download Python Institute.PCAP.PracticeTest.2019-02-18.13q.tqb

Download Exam

File Info

Exam Certified Associate in Python Programming
Number PCAP
File Name Python Institute.PCAP.PracticeTest.2019-02-18.13q.tqb
Size 517 KB
Posted Feb 18, 2019
Download Python Institute.PCAP.PracticeTest.2019-02-18.13q.tqb

How to open VCEX & EXAM Files?

Files with VCEX & EXAM extensions can be opened by ProfExam Simulator.

Purchase

Coupon: MASTEREXAM
With discount: 20%



Exam Hub discount


Demo Questions

Question 1

What will the value of the i variable be when the following loop finishes its execution? 
  


  1. 10
  2. the variable becomes unavailable
  3. 11
  4. 9
Correct answer: B
Explanation:
Reference: https://www.programiz.com/python-programming/pass-statement
Reference: https://www.programiz.com/python-programming/pass-statement



Question 2

A complier is a program designed to (select two answers)


  1. rearrange the source code to make it clearer
  2. check the source code in order to see of it’s correct
  3. execute the source code
  4. translate the source code into machine code
Correct answer: BC



Question 3

What is the expected output of the following snippet? 
  


  1. 3
  2. 1
  3. 2
  4. the code is erroneous
Correct answer: A
Explanation:
  
  



Question 4

Assuming that the following snippet has been successfully executed, which of the equations are True? (Select two answers) 
  


  1. len(a) == len (b)
  2. b [0] +1 ==a [0]
  3. a [0] == b [0]
  4. a [0] + 1 ==b [0]
Correct answer: AC
Explanation:
  
  



Question 5

Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers) 
  


  1. len(a)== len (b)
  2. a [0]-1 ==b [0]
  3. a [0]== b [0]
  4. b [0] - 1 ==a [0]
Correct answer: AB
Explanation:
  
  



Question 6

What is the expected output of the following snippet? 
  


  1. 1
  2. 4
  3. 2
  4. 3
Correct answer: C
Explanation:
  
  



Question 7

You need data which can act as a simple telephone directory. You can obtain it with the following clauses (select two relevant variants; assume that no other items have been created before)


  1. dir={‘Mom’: 5551234567, ‘Dad’: 5557654321}
  2. dir= {‘Mom’: ‘5551234567’, ‘Dad’: ‘5557654321’}
  3. dir= {Mom: 5551234567, Dad: 5557654321}
  4. dir= {Mom: ‘5551234567’, Dad: ‘5557654321’}
Correct answer: CD



Question 8

Can a module run like regular code?


  1. yes, and it can differentiate its behavior between the regular launch and import
  2. it depends on the Python version
  3. yes, but in cannot differentiate its behavior between the regular launch and import
  4. no, it is not possible; a module can be imported, not run
Correct answer: D
Explanation:
you write a module (a .py file) where it can be executed directly. Alternatively, it can also be imported and used in another module. By doing the main check, you can have that code only execute when you want to run the module as a program and not have it execute when someone just wants to import your module and call your functions themselves. Reference: https://developer.rhino3d.com/guides/rhinopython/python-remote-local-module/
you write a module (a .py file) where it can be executed directly. Alternatively, it can also be imported and used in another module. By doing the main check, you can have that code only execute when you want to run the module as a program and not have it execute when someone just wants to import your module and call your functions themselves. 
Reference: https://developer.rhino3d.com/guides/rhinopython/python-remote-local-module/



Question 9

What can you do if you don’t like a long package path like this one? 
import alpha .beta . gamma .delta .epsilon .zeta


  1. you can make an alias for the name using the alias keyword
  2. nothing, you need to come to terms with it
  3. you can shorten it to alpha . zeta and Python will find the proper connection
  4. you can make an alias for the name using the as keyword
Correct answer: D
Explanation:
Reference: https://stackoverflow.com/questions/706595/can-you-define-aliases-for-imported-modules-in-python
Reference: https://stackoverflow.com/questions/706595/can-you-define-aliases-for-imported-modules-in-python



Question 10

What is the expected behavior of the following snippet? 
  
 
It will:


  1. cause a runtime exception on line 02
  2. cause a runtime exception on line 01
  3. cause a runtime exception on line 03
  4. print 3
Correct answer: D
Explanation:
  
  









CONNECT US

Facebook

Twitter

PROFEXAM WITH A 20% DISCOUNT

You can buy ProfExam with a 20% discount!



HOW TO OPEN VCEX FILES

Use ProfExam Simulator to open VCEX files