nerdexam
Python_Institute

PCPP-32-101 · Question #90

What is the result of the following code?

The correct answer is A. 127.0.0.1. config['postgresql'] is assigned as a reference to the same dictionary as config['mysql']. Changing config['mysql']['host'] also changes config['postgresql']['host']. Therefore, both print statements output 127.0.0.1. Exam Questions, Study Guides, Practice Tests. Lead the way…

Networking

Question

What is the result of the following code?

Exhibit

PCPP-32-101 question #90 exhibit

Options

  • A127.0.0.1
  • BAn exception will be raised.
  • C127.0.0.1
  • Dlocalhost

How the community answered

(51 responses)
  • A
    80% (41)
  • B
    12% (6)
  • C
    6% (3)
  • D
    2% (1)

Explanation

config['postgresql'] is assigned as a reference to the same dictionary as config['mysql']. Changing config['mysql']['host'] also changes config['postgresql']['host']. Therefore, both print statements output 127.0.0.1. Exam Questions, Study Guides, Practice Tests. Lead the way to help you pass any IT Certification exams, 100% Pass Guaranteed or Full Refund. Especially Cisco, Microsoft, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on. Our Slogan: First Test, First Pass. Help you to pass any IT Certification exams at the first try. You can reach us at any of the email addresses listed below. Any problems about IT certification or our products, you could rely upon us, we will give you satisfactory answers in 24 hours.

Topics

#socket#localhost#IP address resolution#DNS lookup

Community Discussion

No community discussion yet for this question.

Full PCPP-32-101 Practice