• 2022-06-17
    下列程序的运行结果为( )。class Account: def __init__(self,id): self.id=id id=888acc=Account(100)print(acc.id)
    A: 888
    B: 788
    C: 100
    D: 出错
  • C

    内容

    • 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):​‎ pass​‎​‎t = Tomato()​‎t.grow()​‎​‎知识点:多继承​ A: FruitFruit grow B: FruitVegetable grow C: VegetableFruit grow D: VegetableVegetable grow