class Point: def __init__(self, x = 0, y = 0): self.x = x + 1 self.y = y + 1 p1 = Point() print(p1.x, p1.y) Đâu là output của chương trình dưới đây?

class Point:

def __init__(self, x = 0, y = 0):

self.x = x + 1

self.y = y + 1

p1 = Point()

print(p1.x, p1.y)

Đâu là output của chương trình dưới đây?

A. 0 0

B. 1 1

C. None None

D. x y

Hướng dẫn

Chọn B là đáp án đúng

 

Thư viện tài liệu12 Tháng bảy, 2023 @ 2:30 chiều

Đánh giá chủ đề này
How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site