Skip to content
  • Home
  • CCNA Labs
    • CCNA 1 LAB Activities (v6 & v7)
    • CCNA 2 LAB Activities (v6 & v7)
    • CCNA 3 LAB Activities (v6 & v7)
    • CCNA 4 Lab Activities
  • Linux
    • Linux Unhatched
    • Linux Essentials 2.0
    • Linux Essentials
    • Introduction to Linux I
    • Introduction to Linux II
  • Programming
    • PCAP – Programming Essentials in Python
    • CLA – Programming Essentials in C
    • CPA Programming Essentials in C++
  • About
    • Contact Us
    • Privacy Policy

CCNA 7 Exam Answers 2023

Go with our CCIE, Passed 100%

  • ITE
    • ITE - IT Essentials v7.0
    • ITE - IT Essentials v6.0
      • IT Essentials Lab 2019
    • ITE v5.0 Exam
    • Virtual Activity Laptop
    • Virtual Activity Desktop
  • NE
    • MF
  • CCNA
    • CCNA1
      • CCNA1 v7.0 – ITN
      • CCNA1 v6.0
    • CCNA2
      • CCNA2 v7.0 – SRWE
      • CCNA2 v6.0
    • CCNA3
      • CCNA3 v7.0 – ENSA
      • CCNA3 v6.0
    • CCNA4
      • CCNA4 v6.0
  • Cyber-Security
    • ITC – Introduction to Cybersecurity 2.1 (Level 1)
    • CE – Cybersecurity Essentials 1.1 (Level 2)
    • CCNA CyberOps 1.1 (Level 3)
  • Security
    • CCNA Security v2
  • DevNet
  • CCNA PT Lab 2023

PCAP Python Essentials — PE FINAL TEST Exam Answers: Python 2.0

Last Updated on October 18, 2021 by Admin

PCAP Python Essentials — PE FINAL TEST Exam Answers: Python 2.0 _ 2021 2022

  • Recommend
Python Essentials 1: BASICS
Answers Online Test
Module 1 Test Online
Module 2 Test Online
Module 3 Test Online
Module 4 Test Online
Part 1 Summary Test Online
Python Essentials 2: INTERMEDIATE
Answers Online Test
Module 1 Test Online
Module 2 Test Online
Module 3 Test Online
Module 4 Test Online
Part 2 Summary Test Online
Final Test Online
 
  1. What is the expected output of the following piece of code?

    x, y, z = 3, 2, 1
    z, y, x= x, y, z
    print(x, y, z)
    • 2 1 3
    • 1 2 2
    • 1 2 3
    • 3 2 1
      Options 3 is the correct answer.
  2. Which of the following functions provided by the os module are available in both Windows and Unix? (Select two answers)

    • mkdir()
    • getgroups()
    • getgid()
    • chdir()
  3. What is the expected output of the following code?

    import calendar
    
    c = calendar.Calendar(calendar.SUNDAY)
    
    for weekday in c.iterweekdays():
          print(weekday, end=" ")
    • Su
    • Su Mo Tu We Th Fr Sa
    • 6 0 1 2 3 4 5
    • 7 1 2 3 4 5 6
      Options 3 is the correct answer.
  4. Select the true statements. (Select two answers)

    • PyPI is the only exiting Python repository
    • PyPI is short for Python Package Index
    • PyPI is short for Python Package Installer
    • PyPI is one of many existing Python repositories
  5. What is true about the following line of code?

    print(len((1), )))
    • The code will output 2
    • The code will output 0
    • The code will output 1
    • The code is erroneous
  6. The Exception class contains a property named args – what is it?

    • A list
    • A tuple
    • A string
    • A dictionary
  7. What is the expected result of executing the following code?

    Class A:
             def _init_(self):
                   pass
    
             def f(self):
                  return 1
    
             def g():
                  return self.f()
    
    a = A()
    print(a.g())
    • The code will raise an exception
    • The code will output 1
    • The code will output 0
    • The code will output True
  8. What is the expected result of executing the following code?

    class A:
            pass
    class B:
            pass
    class C(A, B):
           pass
    
    print(issubclass(C, A) and issubclass(C, B))
    • The code will print an empty line
    • The code will raise an exception
    • The code will print True
    • The code will print False
  9. What is the expected output of the following code?

    t = (1, )
    t = t[0] + t[0]
    print(t)
    • 2
    • (1, 1)
    • (1,)
    • 1
      Options 1 is the correct answer.
  10. What is the sys.stdout stream normally associated with?

    • The printer
    • The screen
    • The keyboard
    • A null device
  11. How many stars (*) will the following snippet send to the console?
    i = 4
    
    while i > 0 :
             i -= 2
             print("*")
             if i == 2:
                  break
    else:
          print("*")
    • The snippet will enter an infinite loop, constantly printing one * per line
    • zero
    • one 
    • two
  12. What is true about the following snippet?

    def fun(d, k, v) :
           d[k] = v
    
    my_dictionary = {}
    print(fun(my_dictionary, '1', 'v'))
    • The code will output v
    • The code is erroneous
    • The code will output 1
    • The code will output None
  13. What is the expected output of the following snippet?

    d = {'one': 1, 'three': 3, 'two': 2} 
    for k in sorted(d.values()):
          print(k, end=' ')
    • 1 2 3
    • 2 3 1
    • 3 1 2
    • 3 2 1
      Options 1 is the correct answer.
  14. What is the expected behavior of the following piece of code?

    x = 16
    while x > 0: 
              print('*', end='')
              x //=2
    • The code will output *****
    • The code will output *
    • The code will enter an infinite loop
    • The code will output ***
  15. What is the expected behavior of the following code?

    x = """
    """
    print(len(x))
    • The code will output 2
    • The code will cause an error
    • The code will output 1
    • The code will output 3
  16. What is the name of the directory/folder created by Python used to store pyc files?

    • _cache_
    • _pycfiles_
    • _pycache_
    • _pyc_
  17. What is the expected output of the following code?

    my_string_1 = 'Bond'
    my_string_2 = 'James Bond'
    
    print(my_string_1.isalpha(), my_string_2.isalpha()))
    • False False
    • True False
    • False True
    • True True
      Options 2 is the correct answer.
  18. The meaning of a keyword argument is determined by its:

    • value only
    • position within the argument list
    • both name and value assigned to it
    • connection with existing variables
  19. What is the expected output of the following code, located in the file module.py?

    print(_name_)
    • main
    • module.py
    • _main_
    • _module.py_
  20. Which line properly invokes the function defined as below?

    def fun(a, b, c=0):
            # function body
    • fun(1, c=2)
    • fun(0)
    • fun(a=1, b=0, c=0)
    • fun(b=0, b= 0)
  21. Which of the following sentences is true about the snippet below?

    str_1 = 'string'
    str_2 = str_1[:]
    • str_1 is longer than str_2
    • str_2 is longer than str_1
    • str_1 and str_2 are different (but equal) strings
    • str_1 and str_2 are different names of the same string
  22. What is the expected output of the following code?

    from datetime import timedelta
    delta = timdelta(weeks = 1, days = 7, hours = 11)
    print(delta)
    • 2 weeks, 11:00:00
    • 14 days, 11:00:00
    • 1 week, 7 days, 11 hours
    • 7 days, 11:00:00
      Options 2 is the correct answer.
  • CCNA1 v7
  • CCNA2 v7
  • CCNA3 v7
System Test Exam Answers
Modules 1 – 3 Exam Answers
Modules 4 – 7 Exam Answers
Modules 8 – 10 Exam Answers
Modules 11 – 13 Exam Answers
Modules 14 – 15 Exam Answers
Modules 16 – 17 Exam Answers
Practice Final – ITN Answers
Course Feedback
ITN Practice PT Skills Assessment (PTSA)
Final Exam Answers
Modules 1 – 4 Exam Answers
Modules 5 – 6 Exam Answers
Modules 7 – 9 Exam Answers
Modules 10 – 13 Exam Answers
Modules 14 – 16 Exam Answers
ITN Practice Skills Assessment – PT Answers
SRWE Practice Skills Assessment – PT Part 1 Answers
SRWE Practice Skills Assessment – PT Part 2 Answers
SRWE Hands On Skills Exam Answers
SRWE Practice Final Exam Answers
SRWE Final Exam Answers 
Modules 1 – 2 Exam Answers
Modules 3 – 5 Exam Answers
Modules 6 – 8 Exam Answers
Modules 9 – 12 Exam Answers
Modules 13 – 14 Exam Answers
ITN Practice PT Skills Assessment (PTSA) Answers
SRWE Practice PT Skills Assessment (PTSA) – Part 1 Answers
SRWE Practice PT Skills Assessment (PTSA) – Part 2 Answers
ENSA Practice PT Skills Assessment (PTSA) Answers
ENSA Hands On Skills Exam Answers
Practice Final – ENSA Answers
ENSA Final Exam Answers
CCNA Certification Practice Exam Answers

Copyright © 2023 PressExam.