若vehicle=['train','car','bus','subway','ship','bicycle','car'],则vehicle.count('car')结果是什么?A.carB.7C.1D.2

题目
若vehicle=['train','car','bus','subway','ship','bicycle','car'],则vehicle.count('car')结果是什么?

A.car

B.7

C.1

D.2


相似考题
参考答案和解析
正确答案:D
更多“若vehicle=['train','car','bus','subway','ship','bicycle','car'],则vehicle.count('car')结果是什么? ”相关问题
  • 第1题:

    使用VC6打开考生文件夹下的工程test17_1,此工程包含一个源程序文件test17_1.唧,但该程序运行有问题,请改正程序中的错误,使程序的输出结果如下:

    Vehicle message

    Car message

    Vehicle message

    源程序文件test17_1.cpp 清单如下:

    include <iostream.h>

    class vehicle

    {

    int wheels;

    float weight;

    public:

    /***************** found *****************/

    void message(void){ cout<<"Vehicle message\n";}

    };

    class car:public vehicle

    {

    int passenger_load;

    public:

    /***************** found *****************/

    void message (void){cout>>"Car message\n";}

    };

    class truck:public vehicle

    {

    int passenger_load;

    float payload;

    public:

    int passengers(void){return passenger_load;}

    };

    void main()

    {

    vehicle * unicycle;

    unicycle=new vehicle;

    /***************** found *****************/

    unicycle.message()

    delete unicycle;

    unicycle=new car;

    unicycle->message();

    delete unicycle;

    unicycle=new truck;

    unicycle->message();

    delete unicycle;

    }


    正确答案:(1)错误:void message(void){cout"Vehicle message\n";} 正确:virtual void message(void){cout"Vehicle message\n";} (2)错误:void message(void){cout>>"Carmessage\n”;} 正确:void message(void){eout"Carmessage\n";} (3)错误:unicycle.message(); 正确:unicycle->message();
    (1)错误:void message(void){cout"Vehicle message\n";} 正确:virtual void message(void){cout"Vehicle message\n";} (2)错误:void message(void){cout>>"Carmessage\n”;} 正确:void message(void){eout"Carmessage\n";} (3)错误:unicycle.message(); 正确:unicycle->message(); 解析:(1)主要考查考生对于虚函数使用规则的掌握,要实现对函数message的动态联编应该使用虚函数,否则产生的是静态联编,调用的函数输出结果就与要求不符;
    (2)主要考查考生对于流输出操作的掌握,该处错误的使用了流输入操作;
    (3)主要考查考生是否能分清对象和对象指针,对象指针使用“->”调用成员函数,而对象使用“.”调用成员函数。

  • 第2题:

    若vehicle=['train','bus','car','ship'],则vehicle[1]是什么?

    A.train

    B.bus

    C.car

    D.ship


    正确答案:B

  • 第3题:

    若vehicle=[['train','car'],['bus','subway'],['ship','bicycle'],['car']],则len(vehicle[1][0])结果是什么?

    A.3

    B.7

    C.6

    D.4


    正确答案:A

  • 第4题:

    若vehicle=[['train','car'],['bus','subway'],['ship','bicycle'],['car']],则len(vehicle[1])结果是什么?

    A.2

    B.7

    C.6

    D.4


    正确答案:A

  • 第5题:

    29. When people travel on business(出差) ,they usually take _________ .

    A. a train or a plane

    B. a boat or a train

    C.a car or a boat .

    D.a plane or a car


    正确答案:A
    29.A[解析】从文章最后一句可知。

  • 第6题:

    Travelling by train to Tokyo takes approximately one hour less _____ travelling by car.

    A. for
    B. with
    C. as
    D. than

    答案:D
    解析:

  • 第7题:

    下面哪一些是合法的C++标识符? extern,_book,Car,car_1,ca1r,1car,friend,car1_Car,Car_Type,No.1,123


    正确答案: 合法的C++标识符:_book, Car, car_1, ca1r, car1_Car, Car_Type

  • 第8题:

    单选题
    What is the teacher doing in terms of error correction? T: Make a sentence with have .! S: He have a car . T: He HA VE a car? S: He HAS a car . T: Very good . He HAS a car .
    A

    Direct correction.

    B

    Indirect correction.

    C

    Self-correction.

    D

    Peer correction.


    正确答案: A
    解析:

  • 第9题:

    单选题
    The text indicates that the Canadian airport officials seem to have ______.
    A

    taken effective measures to solve the car-theft problem

    B

    overestimated the seriousness of the car-theft problem

    C

    failed to give proper attention to the car-theft problem

    D

    realized the seriousness of the car-theft problem


    正确答案: B
    解析:
    细节题。关键句:文章的第五段第一句话“Airport officials downplay the problem.”可知,蒙特利尔机场并没有重视车辆被盗窃的问题,故正确的答案为C。

  • 第10题:

    单选题
    How did Mr. Baker get to work?
    A

    By train and by car.

    B

    Just by car.

    C

    On foot.


    正确答案: C
    解析:
    题目问的是:贝克先生怎么上班?第二段第二句“he had to drive home from the railway station.”意思是“他不得不从火车站开车回家”,由此可以推断出他每天开车去火车站,坐火车去上班。所以A符合题意。

  • 第11题:

    单选题
    11. abstract class Vehicle { public int speed() { return 0; } }  12. class Car extends Vehicle { public int speed() { return 60; } }  13. class RaceCar extends Car { public int speed() { return 150; }}  ......  21. RaceCar racer = new RaceCar();  22. Car car = new RaceCar();  23. Vehicle vehicle = new RaceCar();  24. System.out.println(racer.speed() + “, „ + car.speed()  25. + “, “+ vehicle.speed());  What is the result?()
    A

     0, 0,0

    B

     150, 60, 0

    C

     Compilation fails.

    D

     150, 150, 150

    E

     An exception is thrown at runtime.


    正确答案: E
    解析: 暂无解析

  • 第12题:

    单选题
    It is _____ he is determined.
    A

    buying a new car that

    B

    to buy a new car that

    C

    to buy a new car what

    D

    buying a new car which


    正确答案: A
    解析:
    从空格后的内容推知,强调内容为determine的宾语。determine后一般用动名词作宾语,因此排除A、D。what一般不用于强调结构,因此排除C项,故选B。

  • 第13题:

    若已定义了类Vehicle,则下列派生类定义中,错误的是

    A.class Car:Vehicle{/*类体略*/);

    B.class Car:public Car{/*类体略*/);

    C.class Car:public Vehicle{/*类体略*/);

    D.class Car:virtual public Vehicle{/*类体略*/);


    正确答案:B
    解析:派生类从基类的继承方式有3种:公有继承(public)、私有继承(private)和保护继承(protected)。如果不显式地给出继承方式,默认的类继承方式是私有继承,ACD项正确。类的继承是新的类从已有类那时得到已有的特性,故B项错误。

  • 第14题:

    若vehicle=[['train','car'],['bus','subway'],['ship','bicycle'],['car']],则len(vehicle)结果是什么?

    A.1

    B.7

    C.6

    D.4


    正确答案:D

  • 第15题:

    若vehicle=['train','bus','car','ship'],则vehicle.index('car')的结果是什么?

    A.1

    B.2

    C.3

    D.4


    正确答案:B

  • 第16题:

    22..What kind of car does Mrs Hill have?

    A. A fast and new car.

    B. A fast but old car.

    C. A slow and old car.

    D. A fast but small car.


    正确答案:A
    22.A【解析】从文中第二段最后两句“Her car is new. It's very large,and it can g0 200 kilometers an hour!”可知Mrs Hill的车非常新,而且很快。

  • 第17题:

    In order to cut down on the carbon emission,more people choose to travel______.

    A.by electric car,bicycle or plane

    B.by private car,bicycle or bus

    C.by bus,electric car or plane

    D.by bicycle. bus or electric car


    正确答案:D
    解析:见第四段,人们通过骑自行车,坐公共汽车,开电力汽车的方式来减少二氧化碳的排放。故选D。

  • 第18题:

    The car crashed into the train,and the driver was killed__the spot.

    A.on
    B.at
    C.to
    D.by

    答案:A
    解析:
    on the spot表示“当场”。

  • 第19题:

    单选题
    _____
    A

    By car.

    B

    By train.

    C

    By plane.

    D

    By ship.


    正确答案: D
    解析:
    推理题。女士说“你知道我不想乘飞机旅行”,男士说“那我们坐火车吧”。由此可知,他们选择坐火车去旅行。正确答案为B。
    【录音原文】
    W: You know I don’t like to travel by plane.
    M: Yes, I see. Then let’s go there by train.
    Q: How will the two speakers probably travel?

  • 第20题:

    单选题
    How did the narrator and his aunt travel to see his father?
    A

    By car.

    B

    By bus.

    C

    By ship.

    D

    By train.


    正确答案: A
    解析:
    最后一段倒数第五句写到“we left into that unbearable train again”,可知来回的是乘坐的火车。

  • 第21题:

    单选题
    What is the teacher doing in terms of error correction?      T: Make a sentence with have !      S: He have a car.      T: He HA VE a car?      S: He HAS a car.      T:  Very good. He HAS a car.
    A

    Direct correction.

    B

    Indirect correction

    C

    Self-correction.

    D

    Peer correction.


    正确答案: C
    解析:

  • 第22题:

    单选题
    The purpose of the passage is to advertise _____.
    A

    car-renting services in the US

    B

    a special rate of car-renting

    C

    the advantages of car-renting

    D

    a US car-renting company


    正确答案: B
    解析:
    本题是主旨题。文章通篇谈论的是租车公司推出的特价出租服务,并且说明了该种服务的种种优惠条件,覆盖范围很广。A项“美国的租车服务”,C项“租车的好处”,D项“一个美国汽车租赁公司”,均不是正确选项。答案为B。

  • 第23题:

    问答题
    下面哪一些是合法的C++标识符? extern,_book,Car,car_1,ca1r,1car,friend,car1_Car,Car_Type,No.1,123

    正确答案: 合法的C++标识符:_book, Car, car_1, ca1r, car1_Car, Car_Type
    解析: 暂无解析