A: 888
B: 788
C: 100
D: 出错
举一反三
- 下列代码的输出结果是(_____)。 class Account: def __init__(self,id): self.id=id id=888 acc=Account(100) print(acc.id)
- 定义类如下 class Account: def __init__(self, id): self.id=id; id = 888; id = id-100acc = Account(100); print(acc.id)程序运行的结果为788.
- 下列程序的运行结果为 100 。[br][/br]class Account:[br][/br] def __1__(self,id):[br][/br] self.id=id[br][/br] id=888[br][/br]acc=Account(100)[br][/br]print(acc.id)
- 执行下列程序后,acc.id的值是( )。class Account: def __init__(self, id): self.id = id id = 888acc = Account(100)
- 下面程序的运行结果___ #include “stdio.h” int id=3; void main { int id=5; { int id; id=7; printf(“id=%d\n”, id ); } printf(“id=%d\n”, id ); }
内容
- 0
name="Zhang";ID="123"不能输出"zhang的ID号是123"结果的代码是 A: print(name,"的ID号是",ID,sep="") B: print(name+"的ID号是"+ID) C: print("%s的ID号是%s"%(name,ID)) D: print("%s的ID号是%s",%(name,ID))
- 1
Opening an account with ID card at ATM.
- 2
下面关于CSS样式优先级,正确的是 A: !important > id > class > tag B: id> !important > class > tag C: !important > tag > class > id D: tag> id > class > !important
- 3
以下程序段的输出结果是( )。 id='370211200101018956' t=(id[6:10], id[10:12], id[12:14]) date='-'.join(t) print(date)
- 4
下列程序的输出结果是( )。class Fruit(): def __init__(self): print('Fruit') def grow(self): print('Fruit grow')class Vegetable(): def __init__(self): print('Vegetable') def grow(self): print('Vegetable grow') class Tomato(Fruit,Vegetable): passt = Tomato()t.grow()知识点:多继承 A: FruitFruit grow B: FruitVegetable grow C: VegetableFruit grow D: VegetableVegetable grow