PROBLEM SET
题库
按难度与知识点筛选,找到适合的练习题。
题目列表
共 67434 题
A25042
import sqlite3 conn = sqlite3.connect('./mydb.sqlite') cur = conn.cursor() sql = '''INSERT INTO Users (name,password,role) VALUES (?,?,?)''' cur.execute(sql,('admin','123456','管理员')) cur.execute(sql,…
电子学会-Python-L6
困难
--
A25043
CREAT TABLE Users (id,name,password,role)关于上述语句,说法错误的是?( )
电子学会-Python-L6
困难
--
A25044
下列哪个选项不能在SQLite数据库中运行?( )
电子学会-Python-L6
困难
--
A25045
关于JSON格式数据转为Python数据格式,运行以下程序,输出结果是?( )import json a='{"name": "张三", "age": 30, "city": "北京"}' b=json.loads(a) c=list(b.keys()) d=list(b.values()) print(d[2])
电子学会-Python-L6
困难
--
A25046
运行以下代码,绘制出来的第六个柱形图颜色是?( )import matplotlib.pyplot as p import numpy as np x=np.array(['a','b','c','d','e','f']) h=np.array([1,4,5,6,4,3]) c=np.array(['red','blue','green']) p.bar(x=x,height=h,color=c…
电子学会-Python-L6
困难
--
A25047
运行以下关于二维数组读取的程序,输出结果是?( )a=[[1,2,3],[4,5,6],[7,8,9]] print(a[1][2])
电子学会-Python-L6
困难
--
A25048
在命令行窗口分别运行以下代码,输出结果是?( )>>>import numpy as np >>>np.full(6,'6')
电子学会-Python-L6
困难
--
A25049
已知程序1绘制的图形如下图所示,要绘制相同的图形,请补全程序2空白?( )程序1:import matplotlib.pyplot as p import numpy as np x= np.array([0,1,0,1,0,1,0]) p.plot(x,'o:r') p.show()程序2:import matplotlib.pyplot as p import numpy as np x= …
电子学会-Python-L6
困难
--
A25050
编写程序绘制如下图所示的直线,程序空白处应填?( )import matplotlib.pyplot as p import numpy as np x= np.array([0,1,2,____,4,5]) p.plot(x,'o:r') p.show()
电子学会-Python-L6
困难
--
A25051
运行下面代码的正确结果是?( )with open("myfile.txt", "w") as out_file: out_file.write("This is my first Python program.") with open("myfile.txt", "r") as in_file: myfile = in_file.read() print(myfile) 其中myfile.tx…
电子学会-Python-L6
困难
--
A25052
运行下面代码的正确结果是?( )filename = "example.txt" line_count = 0 with open(filename, "r") as file: for line in file: line_count += 1 print(f"The file 'example' has {line_count} lines.") 其中example.txt文件内容如下: M…
电子学会-Python-L6
困难
--
A25053
在 Python 中,以下哪个函数可以用于创建一个新的文件?( )
电子学会-Python-L6
困难
--
A25054
运行下面代码的正确结果是?( )with open("example.txt", "a") as file: file.write("I see you.") 其中example.txt文件内容如下: This is an example.
电子学会-Python-L6
困难
--
A25055
可怜的简单题
电子学会-C-L8
困难
--
A25056
逆散列问题
电子学会-C-L8
困难
--
A25058
清点代码库
电子学会-C-L8
困难
--
A25059
夺宝大赛
电子学会-C-L6
困难
--
A25060
词频统计
电子学会-C-L6
困难
--
A25061
智能陪护
电子学会-C-L6
困难
--
A25062
彩虹瓶
电子学会-C-L6
困难
--