PFP191_-_FE_-_SU_2023_410.webp
N

PFP191_-_FE_-_SU_2023_410.webp

(Choose 1 answer)
Given a code,
class People():
def __init__(self, name):self.name = name
def namePrint(self):print(self.name)
person1 = People("Sally")person2 = People("Louise")person1.namePrint()
What is correct answer?
A. person1 and person2 are two different instances of the People class.
B. The init method is used to set initial values for attributes.
C. 'self' is not needed in def namePrint(self):
D. person2 has a different value for 'name' than person1.
Exit 19

Thông tin

Category
PFP191
Thêm bởi
Noelle2000
Ngày thêm
Lượt xem
895
Lượt bình luận
10
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PFP191_-_FE_-_SU_2023_410.webp
File size
54.8 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom