更多“Brandies are also made from fruits other than the grape,such as plum or peac() ”相关问题
  • 第1题:

    针对下列程序段,需要( )个测试用例才可以满足语句覆盖的要求。
    switch(value){case 0:other=30;break;case 1:other=50;break;case 2:other=300;case 3:other=other/value;break;default:other=other*value;}

    A.2
    B.3
    C.4
    D.5

    答案:C
    解析:
    本题考查白盒测试用例设计方法--语句覆盖法的概念。语句覆盖(Statement Coverage)的含义是:选择足够多的测试数据,使被测程序中的每条语句至少执行一次。

  • 第2题:

    输出字典fruits中键值最大的键值对,完善代码。 fruits={"apple":10,"mango":12,"durian":20,"banana":5} m="apple" for key in fruits.keys(): if __________: m=key print("{}:{}".format(m,fruits[m]))


  • 第3题:

    1、针对下列程序段,需要()个测试用例才可以满足语句覆盖的要求。 switch (value ) { case 0: other = 30; break; case 1: other = 50; break; case 2: other = 300; case 3: other = other/value; break; default: other = other * value; }

    A.2

    B.3

    C.4

    D.5


    4

  • 第4题:

    88、下列代码循环遍历列表fruits中的每个元素。 fruits = ["apple", "banana", "cherry"] ____ x ____fruits: print(x)


    正确

  • 第5题:

    下列语句执行后的结果是: fruits = {'apple':2, 'banana':6, 'pear':4} fruits['banana'] = 7 print(sum(fruits.values() ) )

    A.7

    B.19

    C.12

    D.13


    13

  • 第6题:

    【单选题】显示水果中的第3个水果,正确的命令是?

    A.db.test.find({},{"fruits":{$slice:[3,1]}})

    B.db.test.find({},{"fruits":{$slice:3}})

    C.db.test.find({},{"fruits":{$slice:[2,1]}})

    D.db.test.find({},{"fruits":{$slice:2}})


    苹果;香蕉;芒果