• 2022-05-31
    以下类方法定义正确的是()
    A: class Student: fav=("唱歌","跳舞","绘画") def showFav(cls): for item in cls.fav: print(item)
    B: class Student: fav=("唱歌","跳舞","绘画") @classmethod def showFav(cls): for item in fav: print(item)
    C: class Student: fav=("唱歌","跳舞","绘画") @classmethod def showFav(cls): for item in cls.fav: print(item)
    D: class Student: fav=("唱歌","跳舞","绘画") @classmethod def showFav(): for item in fav: print(item)
  • C

    举一反三

    内容

    • 0

      Word中插入数学公式的方法是()。 A: "插入"→"形状"→"公式" B: "开发工具"→"公式" C: "插入"→"公式"→"插入新公式" D: "引用"→"插入"→"公式"

    • 1

      根据用户在文本框txtName中输入的姓名对Student表进行查询,以下SQL语句定义正确的是__________________。 A: String sql="Select * from Student where Sname="+txtName.getText(); B: String sql="Select * from Student where Sname='"+txtName.getText()+"'"; C: String sql="Select * from Student where Sname like "+txtName.getText(); D: String sql="Select * from Student where Sname like '"+txtName.getText()+"'";

    • 2

      下列程序返回的结果是a = "first"def second(a): a = "second"def third(): global a a = "third"third()print(a, end=',')second("fourth")print(a)? third, third;|second,third;|second,first|first,second;

    • 3

      从学生表student查询所有女学生的信息,正确的语句是( )。 A: SELECT B: FROM student where 性别="女"; C: SELECT * FROM student where 性别="女"; D: SELECT ? FROM student where 性别="女"; E: SELECT FROM student where 性别="女";

    • 4

      在JSP页面中,正确引入JavaBean的是()。 A: <%jsp: useBean id ="myBean” scope ="page” class="pkg.MyBean" %> B: <jsp: useBean name ="myBean” scope ="page” class="pkg.MyBean"> C: <jsp: useBean id ="myBean” scope ="page” class="pkg.MyBean”/> D: <jsp: useBean name ="myBean” scope ="page” class="pkg.MyBean”/>