关于以下代码说法正确的是(_____)。 class Student: def language(self): print ("All the students like Python") class Mary(Student): def work(self): print("Mary is programming") class Tom(Student): def language(self): print("Tom likes JAVA") mary = Mary() tom = Tom()A.mary.language()会打印出All the students like PythonB.tom.language()会打印出All the students like PythonC.tom.work()会打印出Tom is programmingD.tom.language()会打印出Tom likes JAVA

关于以下代码说法正确的是(_____)。 class Student: def language(self): print ("All the students like Python") class Mary(Student): def work(self): print("Mary is programming") class Tom(Student): def language(self): print("Tom likes JAVA") mary = Mary() tom = Tom()

A.mary.language()会打印出All the students like Python

B.tom.language()会打印出All the students like Python

C.tom.work()会打印出Tom is programming

D.tom.language()会打印出Tom likes JAVA


参考答案和解析
一个角色可以有多段脚本程序,可以存在多个“当小绿旗被点击”积木

相关考题:

Get up! Mary. Tom has () called you three times this morning. A、yetB、alreadyC、never

阅读下列代码 public class Test 2005{ public static void main(String args[]){ Strings="Test"; switch(s){ case "Java":System.out.print("Java"); break; case "Language":System.out.print("Language"); break; case "Test":System.out.ptint("Test"); break; } } } 其运行结果是A.JavaB.LanguageC.TestD.编译出错

( 19 )阅读下列代码public class Test2005{public static void main(String args[]){String s= ″ Test ″ ;Switch(s){case ″ Java ″ : System.out.print( ″ Java ″ ) ;break ;case ″ Language ″ : System.out.print( ″ Language ″ ) ;break ;case ″ Test ″ : System.out.print( ″ Test ″ ) ;break ;}}}其运行结果是A ) JavaB ) LanguageC ) TestD )编译出错

Tom _____the music when Mary entered the room.A. listened toB. was listeningC. was listening to

Tom is considered to be()the other students in her class.A. less intelligentB. the most intelligentC.as intelligent as

Tom isn’t outgoing. Neither ______ Mary.A、doesB、isC、doD、did

Tom is considered to be ______ the other students in his class. A. less intelligentB. the most intelligentC. as intelligent as

Tom and John have arrived, but ________ students in the class aren’t here yet. A.otherB.othersC.the othersD.the other

类Student的声明如下:packagecom.schoolclassStudent{Stringname;intage;Student(Stringname,intage){//code}voidstudy(Stringsubject){//code}}正确调用方法study(Stringsubject)的是哪项?() A.Studentstu=newStudent(“Tom”,23);stu.study(“数学”);B.Student.study(“数学”);C.Studentstu=newStudent(“Tom”,23);stu.study();D.Studentstu=newStudent(“Tom”,23);Stringresult=stu.study(“数学”);

阅读下列代码 public class Test { public static void main(String args[]) { String s = "Test"; switch (s) { case "Java": System.out.print("Java"); break; case "Language": System.out.print("Language"); break; case "Test": System.out.print("Test"); break; } } } 其运行结果是( )。A.JavaB.LanguageC.TestD.编译出错

阅读下列代码 public class Test2005{ public static void main(String args[]){ String s="Test"; switch(s){ case"Java":System.out.print("Java"); break; case"Language":System.out.print("Lan- guage"); break; case"Test":System.out.print("Test"); break; } } } 其运行结果是( )。A.JavaB.LanguageC.TestD.编译时出错

________ Tom ________ Mary speaks good Chinese, so they can communicate with these Chinese students very well.A.Neither, nor B. Not only, but also C.Both, and D.Either, or

Tom_ i ______Mary to his birthday party yesterday.

Tod likes sports. He (11) basketball every afternoon. He has a brother. (12) name is Tom. Tom (13) playing sports, but he likes sports shows(节目). He (14) TV every evening. Tod and Tom like French fries, and they often eat (15).But French fries are (16) healthy.(17) boys and girls like ice cream, but they don’t like (18) ,(19) do they like? They like fruits.Tod likes apples and Tom likes (20).( )11.A.playB.playsC.is play

Draw a labeled constituent structure tree diagram for each of the following sentences: 1) The student likes the new linguistics professor. 2) John suggested Mary take the linguistics class.

Would you like to join me for a quick lunch before class? () but I promised Tom to go out with him.AI'd love toBI like itCI don'tDI will

早上8:00Mary至保安值班室领取了西餐厅钥匙,23:30Tom前来归还,请问此操作有什么问题

类Student的声明如下:   package com.school class Student{ String name;  int age;  Student(String name,int age){  //code } void study(String subject){ / /code } }  正确调用方法study(String subject)的是哪项?() A、Student stu = new Student(“Tom”,23); stu.study(“数学”);B、Student.study(“数学”);C、Student stu = new Student(“Tom”,23); stu.study();D、Student stu = new Student(“Tom”,23); String result=stu.study(“数学”);

下列有关类声明的代码片段,哪一项是正确的?() A、 import java.sql.*; package school; class Student{ }B、 package school; import java.sql.*; class Student{ }C、 package school; class Student{ } import java.sql.*;D、 package school; import java.sql.*;private String name; class Student{ }

Which statements about inheritance are true?()         A、 In Java programming language only allows single inheritance.B、 In Java programming language allows a class to implement only one interface.C、 In Java programming language a class cannot extend a class and implement a interface together.D、 In Java programming language single inheritance makes code more reliable.

对于如下代码,描述正确的是哪项? ()   class Student{   public static void main(String[] args){   Student student = new Student();  }  }  A、Student student 声明了一个类B、new Student()创建了Student 对象的一个实例C、Student student 声明了对象Student 的一个引用D、class Student 声明了一个类

单选题No one except Tom and Mary _____ late for the class.AareBisCwereDwas

单选题创建一个名为student的新类,保存新类的类库名称是mylib,新类的父类是Person,正确的命令是(  )。ACREATE CLASS mylib OF student As PersonBCREATE CLASS student OF Person As mylibCCREATE CLASS student OF mylib As PersonDCREATE CLASS Person OF mylib As student

单选题下列有关类声明的代码片段,哪一项是正确的?()A import java.sql.*; package school; class Student{ }B package school; import java.sql.*; class Student{ }C package school; class Student{ } import java.sql.*;D package school; import java.sql.*;private String name; class Student{ }

多选题Which statements about inheritance are true?()AIn Java programming language only allows single inheritance.BIn Java programming language allows a class to implement only one interface.CIn Java programming language a class cannot extend a class and implement a interface together.DIn Java programming language single inheritance makes code more reliable.

单选题Mary is the only student in my class______speaks Chinese.AwhoBwhichCwhereDwhat

单选题Come along now and sit down. Tom, can you make ______ for Mary?Aa faceBroomCsome differenceDspaces

单选题类Student的声明如下:   package com.school class Student{ String name;  int age;  Student(String name,int age){  //code } void study(String subject){ / /code } }  正确调用方法study(String subject)的是哪项?()AStudent stu = new Student(“Tom”,23); stu.study(“数学”);BStudent.study(“数学”);CStudent stu = new Student(“Tom”,23); stu.study();DStudent stu = new Student(“Tom”,23); String result=stu.study(“数学”);