class Food():
foods = ‘香蕉’
def __init__(self, name):
self.name = name
foods=Food(‘苹果’)
print(Food.foods)
控制台中会显示以下哪个内容?
class Student():
classes = ‘五年级六班’
def __init__(self, name):
self.name = name
myName = Student(‘Tom’)
print(Student.classes) 控制台中会显示以下哪个内容?
def func1():
temperature = '27℃'
print('室内温度:'+ temperature)
def func2():
print('室外温度:'+ temperature)
func1()
func2()
def fun():
light = '灯光'
print(light+'照明')
fun()
print(light+'照明')
控制台中会显示以下哪个内容?
6题 | 被引用0次