×

Special Offer! November Sale at DumpsCity! Get 20% Off on All Certification Exam Questions. Use Code: DC20OFF

Free Python Institute PCAP-31-03 Exam Questions

Try our Free Demo Practice Tests for Comprehensive PCAP-31-03 Exam Preparation

  • Python Institute PCAP-31-03 Exam Questions
  • Provided By: Python Institute
  • Exam: Certified Associate in Python Programming
  • Certification: PCAP
  • Total Questions: 704
  • Updated On: Nov 18, 2024
  • Rated: 4.9 |
  • Online Users: 1408
Page No. 1 of 141
Add To Cart
  • Question 1
    • Given the code below,

      which of the expressions will evaluate to True?

      1. class Control:

      2.     my_ID = 1

      3.  

      4.     def say(self):

      5.         return self.my_ID

      6.  

      7.  

      8. class Button(Control):

      9.     my_ID = 2

      10.  

      11.  

      12. class Radio(Button):

      13.     def say(self):

      14.         return -self.my_ID

      15.  

      16.  

      17. selection = Radio()

      18. element = Control()

      19. start = Button()

      (Select two answers.)


      Answer: A,C
  • Question 2
    • How many elements will the following list contain?

      data = [i for i in range(-1, 2)]


      Answer: D
  • Question 3
    • What is the expected output of the following snippet?
      Capture

      Answer: D
  • Question 4
    • What would you insert instead of ???

      so that the program prints TRUE to the monitor?

      1. w = 7

      2. x = 3

      3. y = 4

      4. z = True

      5. a = w + x * y

      6. b = w + x / z

      7.  

      8. if ???:

      9.     print('TRUE')

      10. else:

      11.     print('FALSE')


      Answer: C
  • Question 5
    • What is the expected output of the following code?

      1. file = open('data.txt', 'w+')

      2. print('Name of the file: ', file.name)

      3.  

      4. s = 'Peter Wellert\nHello everybody'

      5. file.write(s)

      6. file.seek(0)

      7. for line in file:

      8.     print(line)

      9.  

      10. file.close()


      Answer: A
PAGE: 1 - 141
Add To Cart

© Copyrights Dumpscity 2024. All Rights Reserved

We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the Dumpscity.