题目内容 (请给出正确答案)
[主观题]

class StudentDB:     def openDB(self):         sel...

class StudentDB:     def openDB(self):         self.con=sqlite3.connect("students.db")         self.cursor=self.con.cursor()     def closeDB(self):         self.con.commit()         self.con.close()     def initTable(self):         res={}         try:             self.cursor.execute("create table students (No varchar(16) primary key,Name varchar(16), Sex varchar(8), Age int)")             res["msg"]="OK"         except Exception as err:             res["msg"]=str(err)         return res     def insertRow(self,No,Name,Sex,Age):         res={}         try:             ___________________________________________             res["msg"]="OK"         except Exception as err:             res["msg"]=str(err)         return res 程序插入一条学生记录,缺失的语句是

A、self.cursor.execute("insert into students (No,Name,Sex,Age) values (%s,%s,%s,%s)",(No,Name,Sex,Age))

B、self.cursor.execute("insert into students (No,Name,Sex,Age) values (%s,%s,%s,%d)",(No,Name,Sex,Age))

C、self.cursor.execute("insert into students (No,Name,Sex,Age) values (@No,@Name,@Sex,@Age)",(No,Name,Sex,Age))

D、self.cursor.execute("insert into students (No,Name,Sex,Age) values (,?,?,?)",(No,Name,Sex,Age))

暂无答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“class StudentDB: def openDB(se…”相关的问题

第1题

class StudentDB:     def openDB(self):         sel...

class StudentDB:     def openDB(self):         self.con=sqlite3.connect("students.db")         self.cursor=self.con.cursor()     def closeDB(self):         self.con.commit()         self.con.close()     def initTable(self):         res={}         try:             self.cursor.execute("create table students (No varchar(16) primary key,Name varchar(16), Sex varchar(8), Age int)")             res["msg"]="OK"         except Exception as err:             res["msg"]=str(err)         return res     def updateRow(self,No,Name,Sex,Age):         res={}         try:             ___________________________________________             res["msg"]="OK"         except Exception as err:             res["msg"]=str(err)         return res 程序修改一条学生记录,缺失的语句是

A、self.cursor.execute("update students set Name=%s,Sex=%s,Age=%s where No=%s",(Name,Sex,Age,No))

B、self.cursor.execute("update students set Name=%s,Sex=%s,Age=%s where No=%d",(Name,Sex,Age,No))

C、self.cursor.execute("update students set Name=?,Sex=?,Age=? where No=?",(Name,Sex,Age,No))

D、self.cursor.execute("update students set Name=%,Sex=%,Age=% where No=%",(Name,Sex,Age,No))

点击查看答案

第2题

class StudentDB:     def openDB(self):         sel...

class StudentDB:     def openDB(self):         self.con=sqlite3.connect("students.db")         self.cursor=self.con.cursor()     def closeDB(self):         self.con.commit()         self.con.close()     def initTable(self):         res={}         try:             self.cursor.execute("create table students (No varchar(16) primary key,Name varchar(16), Sex varchar(8), Age int)")             res["msg"]="OK"         except Exception as err:             res["msg"]=str(err)         return res     def deleteRow(self,No):         res={}         try:            ______________________________________________             res["msg"]="OK"         except Exception as err:             res["msg"]=str(err)         return res 程序删除一条学生记录,缺失的语句是

A、self.cursor.execute("delete from students where No=?",(No))

B、self.cursor.execute("delete from students where No=?",(No,))

C、self.cursor.execute("delete from students where No=%s",(No,))

D、self.cursor.execute("delete from students where No=%s",(No))

点击查看答案

第3题

class StudentDB:     def openDB(self):         sel...

class StudentDB:     def openDB(self):         self.con=sqlite3.connect("students.db")         self.cursor=self.con.cursor()     def closeDB(self):         self.con.commit()         self.con.close()     def initTable(self):         res={}         try:             self.cursor.execute("create table students (No varchar(16) primary key,Name varchar(16), Sex varchar(8), Age int)")             res["msg"]="OK"         except Exception as err:             res["msg"]=str(err)         return res     def selectRows(self):         res={}         try:             data=[]             __________________________________________________             __________________________________________________             for row in rows:                 d={}                 d["No"]=row[0]                 d["Name"]=row[1]                 d["Sex"]=row[2]                 d["Age"]=row[3]                 data.append(d)             res["msg"]="OK"             res["data"]=data         except Exception as err:             res["msg"]=str(err)         return res 从数据库中读出所有学生记录,缺失的语句是

A、self.cursor.execute("select * from students order by No");rows=self.cursor.fetchall()

B、self.con.execute("select * from students order by No");rows=self.con.fetchall()

C、self.cursor.execute("select * from students order by No");rows=self.cursor.fetch()

D、self.con.execute("select * from students order by No");rows=self.con.fetch()

点击查看答案

第4题

VBA中打开“student”表的语句是( )。

A.Docmd.OpenForm"stUdent"

B.Docmd.OpenQuery"student"

C.Docmd.OpenTable"student"

D.Docmd.Openreport"student"

点击查看答案

第5题

What are closed-class words and open-class words?

点击查看答案

第6题

VBA中打开student表的语句是( )。

A.Docmd.OpenForm"student"

B.Docmd.OpenQuery"student"

C.Docmd.OpenTable"student"

D.Docmd.Openreport"student"

点击查看答案

第7题

VBA中打开“student”表的语句是( )。

A.Docmd.OpenForm"student"

B.Docmd.OpenQuery"student"

C.Docmd.OpenTable"student"

D.Docmd.Openreport"student"

点击查看答案

第8题

VBA中打开“student”表的语句是( )。

A.Doemd.OpenForm”student”

B.Docmd.OpenQuery”student”

C.Docmd.OpenTable”student”

D.Docmd.Openreport”student”

点击查看答案

第9题

一数据库名为student,要想打开该数据库,应使用命令

A.OPEN student

B.OPEN DATABASE student

C.USE DATABASE student

D.USE student

点击查看答案

第10题

//收音机 class Radio { void openRadio(Battery batt...

//收音机 class Radio { void openRadio(Battery battery){ battery.electricityAmount=battery.electricityAmount-10; } } //电池 class Battery { int electricityAmount; Battery(int amount){ electricityAmount=amount; } } //用户测试新买的电池,放进收音机,打开收音机听新闻 public class A { public static void main(String args[]){ Battery nanfu=new Battery(100); System.out.println("南孚电池的储量是:"+nanfu.electricityAmount); Radio radio=new Radio(); System.out.println("收音机开始使用南孚电池"); radio.openRadio(【 请填空 】); System.out.println("目前南孚电池的储量是:"+nanfu.electricityAmount); } }

点击查看答案
热门考试 全部 >
相关试卷 全部 >
账号:
你好,尊敬的上学吧用户
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信