程序没有报错,也没有按照我的期望输出正确的结果
class GPU:
"""一次模拟空气的简单尝试(bushi"""
def __init__(self,make,typee,type_number,power):
"""取得显卡信息"""
self.make = make
self.typee = typee
self.type_number = type_number
self.power = power
def get_information(self):
"""返回描述性信息"""
GPU_name = f'{self.make} {self.typee} {self.type_number} {self.power}'
infornation =(f'我的第一张显卡是{GPU_name}')
return information
my_GPU = GPU('MSI','GT',630,'75W')
print(my_GPU)
运行结果如下:
<__main__.GPU object at 0x000002A31AC57CD0>
(program exited with code: 0)
请按任意键继续. . .