单选题

运行以下Python代码,结果是?( )

class Person():    def __init__(self, name, age):        self.name = name        self.age = age    def say_hello(self):        print(f"Hello, my name is {self.name}. I am {self.age} years ol")person1 = Person("Alice", 25)person2 = Person("Bob", 30)person1.say_hello()

A.

Hello, my name is Alice. I am 25 years ol

B.

Hello, my name is Bo I am 30 years ol

C.

Hello, my name is Bo I am 25 years ol

D.

Hello, my name is Alice. I am 30 years ol

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部