Summer Certification Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: force70

Python Institute PCPP1 – Certified Professional in Python Programming 1 PCPP-32-101 Question # 18 Topic 2 Discussion

Python Institute PCPP1 – Certified Professional in Python Programming 1 PCPP-32-101 Question # 18 Topic 2 Discussion

PCPP-32-101 Exam Topic 2 Question 18 Discussion:
Question #: 18
Topic #: 2

Analyze the following snippet and choose the best statement that describes it.

class Sword:

var1 = 'weapon'

def __init__(self):

self.name = 'Excalibur'

s1 = Sword()


A.

The snippet will cause an AttributeError exception.


B.

The snippet will cause a ValueError exception.


C.

The class variable value can be updated with the following code: cls.var1


D.

The class variable value can be updated with the following code: Sword.var1


Get Premium PCPP-32-101 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.