青少年软件编程(Python)等级考试试卷(四级)
一、单选题(共25题,共50分)
| 1. |
有n个按名称排序的商品,使用对分查找法搜索任何一商品, 最多查找次数为5次,则n的值可能为?( ) |
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
1.6k累计阅读
1.7k平均单平台
已同步平台
优快云
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄6年
青少年软件编程(Python)等级考试试卷(四级)
| 1. |
有n个按名称排序的商品,使用对分查找法搜索任何一商品, 最多查找次数为5次,则n的值可能为?( ) |
当前文章被以下社区和专栏收录:
2021年12月电子学会Python等级考试试卷(一级)答案解析
青少年软件编程(Python)等级考试试卷(一级) 一、单选题(共25题,共50分) 1. 昨天的温度是5摄氏度,今天降温7摄氏度,今天的温度是多少摄氏度?( ) A. 12 B. 7 C. 2 D. -2 试题编号:20210302-sxw-29 试题类型:单选题 标准答案:D 试题难度:一般 试题解析:负数计算 考生答案:D 考生得分:2 是否评分:已评分 评价描述: 2. 分析下面程序,关于程序说法正确的是?( ) x1="11" x2="12" x..
2021年12月电子学会Python等级考试试卷(三级)答案解析
需要所有考级相关的资料可以添加我的微信:15570666506 青少年软件编程(Python)等级考试试卷(三级) 分数:100题数:38 总体情况 一、单选题(共25题,共50分) 1. 小明在学习计算机时,学习到了一个十六进制数101,这个十六进制数对应的十进制数的数值是?( ) A. 65 B. 66 C. 256 D. 257 试题编号:20200313-tsn-04 试题类型:单选题 标准答案:D 试题难度:容易 ...
2020年12月电子学会Python等级考试试卷(四级)考题解析
青少年软件编程(Python)等级考试试卷(四级) 分数:100.00 题数:38 一、单选题(共25题,每题2分,共50分) 1. 以下有关算法的表述中正确的是?( ) A、描述算法可以有不同的方式,可用自然语言也可用流程图等 B、算法可以看成按照要求设计好的有限的确切的步骤解决问题,并且这样的步骤只能解决当前问题 C、算法需要一步一步执行,每一步执行的操作必须明确,不能含混不清,而且经过有限步或无限步后能得出结果 D、算法要求按部就班地执行相应的步骤,每一步可...
2022年12月电子学会Python等级考试试卷(三级)答案解析
青少年软件编程(Python)等级考试试卷(三级)
2023年12 月电子学会Python等级考试试卷(四级)答案解析
已知,从1到n的连续自然数相乘的积叫做阶乘,用符号n!如果允许形参设置默认值,则函数定义时要先列出没有默认值的形参,再列出有默认值的形参。小张在学习对分查找后,想利用该思路来实践一下,加深对该算法的理解。上世纪中期,校园里流行一种数学游戏,其规则十分简单:任意取一个自然数,若它是奇数,这些子问题的求解方法与原问题相同,只是在数量和规模上不同,而且每次递归调用时,当函数运行结束后,局部变量的值依然存在,下次函数调用可以继续使用。他的思路是,首先将全区所有学生的成绩降序排序,然后利用对分查找思想解决。
2020年12月电子学会Python等级考试试卷(三级)考题解析
青少年软件编程(Python)等级考试试卷(三级) 分数:100.00 题数:38 一、单选题(共25题,每题2分,共50分) 要对二维列表所有的数据进行格式化输出,打印成表格形状,程序段如下: ls = [[‘金京’,89],[ ‘吴树海’,80],[ ‘王津津’,90]] for row in range(len(ls)): for column in range(len(ls[row])): &
2020年12月电子学会Python等级考试试卷(二级)考题解析
青少年软件编程(Python)等级考试试卷(二级) 分数:100.00 题数:37 一、单选题(共25题,每题2分,共50分) 执行以下代码中,输出的结果是?( ) sum=0 for i in range(1,10,3): sum=sum+i print(sum,i) A、22 10 B、12 7 C、45 9 D、55 10 试题编号:20200329-tgf-006 题型:单选题 答案:B 难度:一般 试题解析: 已知s=list(“sgdha
2020年12月电子学会Python等级考试试卷(一级)考题解析
青少年软件编程(Python)等级考试试卷(一级) 分数:100.00 题数:37 一、单选题(共25题,每题2分,共50分) 执行语句print(10==10.0)的结果为?( ) A、10 B、10.0 C、True D、False 试题编号:20200319-fjn-025 题型:单选题 答案:C 难度:一般 试题解析: 执行语句y=4**3后,变量y的值为?( ) A、0 B、12 C、64 D、81 试题编号:20200319-fjn-029 题型:单选题 答案:C
电子学会2020年12月青少年软件编程(图形化)等级考试试卷(四级)答案解析
青少年软件编程(图形化)等级考试试卷(四级)
2023年12 月电子学会Python等级考试试卷(三级)答案解析
观察发现,在实际生活中,绿灯显示时长不可能为小数,因此若要上述输出结果正常,可以修改print(t)语句,那么你会如何修改?学校图书馆为了方便查找管理书籍,给每本书编写了号码,[8,9,10,12,13,14,16,17,25,27],在Python中,readlines()每次按行读取文件内容,通常将读取到的内容放到一个字符串变量中,print('要查找的书号['+str(hm)+']不在列表lst中。print('要查找的书号['+str(hm)+']不在列表lst中。不同的人有不同的行走速度。
2023年12 月电子学会Python等级考试试卷(二级)答案解析
poet=[{'唐':['李白','王维','孟浩然'],'宋':['苏轼','陆游','王安石']},'618年-907年',['960年-1279年']]地上的10块食物重量(单位:毫克)为500,60000, 25,1200, 2200, 1800, 10000, 80000, 3000, 65.list = ['春季', '夏季', '秋季', '冬季', '1+1', 6+1, 'ab']ls=['富强','民主','文明','和谐','自由','平等','公正','法治']
2019年12月电子学会Python等级考试试卷(一级)考题解析
青少年软件编程(Python)等级考试试卷(一级) 分数:100题数:50 一、单选题(共30题,每题2分,共60分) 1. 假设a=20,b=3,那么a or b的结果是() A. 20 B. 0 C. ...
2023年12 月电子学会Python等级考试试卷(六级)答案解析
编写一个类`Circle`,包含两个属性`radius`和`color`,以及四个方法`get_area()`、`get_circumference()`、`get_diameter()`和`print_info()`,分别用于计算圆面积、圆周长、圆直径,并打印出圆的半径和颜色。cursor.execute('insert into user (id, name) values (\'1\', \'张三\')')文本文件'a.txt'为空文件,执行以下Python后,'a.txt'文件中的内容是?
pulsemaker:一个Python小部件库,用于为量子计算硬件设计脉冲和脉冲时间表。 可以在Jupyter笔记本,JupyterLab和IPython内核中使用
脉冲发生器 Pulsemaker是一个Python小部件库,用于为量子计算硬件设计脉冲和脉冲时间表。 该库可以在Jupyter笔记本,JupyterLab和IPython内核中使用。 当前,导出功能仅支持IBM的 ,但将来将支持Rigetti的 。 还考虑与其他量子硬件平台(例如Pasqal的 )的兼容性。 要查看将PulseDesigner和ScheduleDesigner到一个仪表板中的工作流程,请查看 。 脉冲设计器 时间表设计师 入门 安装 目前,安装需要开发安装(即将推出PyPI软件包)。 已通过JupyterLab 2进行测试,因此可能尚未在JupyterLab 3中运行。 对于开发安装(需要npm), $ git clone https://github.com/adgt/pulsemaker.git $ cd pulsemaker $ pip install -e
Ubuntu20.04安装NVIDIA显卡驱动避坑指南:从.run文件到完美运行
本文详细介绍了在Ubuntu20.04系统上通过.run文件安装NVIDIA显卡驱动的完整流程和避坑技巧。从禁用Nouveau驱动、选择合适显示管理器到处理常见安装问题,提供了一套经过验证的解决方案,帮助用户顺利完成驱动安装并优化性能。
普通开普勒式望远镜光学设计1-初始结构设计选型与物镜像差校正
普通开普勒式望远镜光学设计1: 完成了望远镜的总体结构设计,确定其物镜与目镜的初始结构选型,使用Zemax软件完成望远镜的双胶合物镜的像差校正。
STM32G4系列数字LLC控制程序开发实战
本文详细介绍了基于STM32G4系列MCU的数字LLC控制程序开发全流程。从开发环境搭建、中断服务函数设计,到核心的电压环PID算法、Burst模式控制、状态机设计以及软启动优化,提供了完整的实战代码和关键参数调试经验,帮助开发者高效实现高性能数字电源控制。
Mac用户看过来!M1/M2芯片安装CiteSpace完整指南(从Homebrew到成功运行)
本文为Mac M1/M2芯片用户提供CiteSpace安装的完整指南,从Homebrew安装适配的Java环境到最终成功运行CiteSpace。详细步骤包括环境检查、Java配置、CiteSpace下载与优化,解决常见问题如内存分配、图形渲染和中文显示乱码,确保科研人员能顺利使用这一文献可视化工具。
IB网络下不同租户业务隔离方案
IB(InfiniBand)网络隔离可以在不同的通信模式下实现,其中包括 IPoIB(IP over InfiniBand)通信模式。在 IPoIB 模式下,InfiniBand 网络可以承载 IP 数据包,使得基于 IP 的应用程序能够在 InfiniBand 网络上进行通信。在这种情况下,IB 网络隔离通常指通过配置 Partition Key(PKey)来实现不同的租户或应用程序之间的网络隔离。然而,IB 网络隔离并不仅限于 IPoIB 模式。
RK+linux教程:RK3588 RGA硬件加速在YOLOv5图像预处理中的深度应用教程
摘要: 本教程深入解析了RK3588芯片的RGA硬件加速器在YOLOv5图像预处理中的应用。通过专用硬件设计,RGA支持图像缩放、边界填充等核心操作,结合零拷贝技术显著提升处理效率。重点分析了LetterBox算法的RGA实现,包括参数计算、边界填充和性能优化,并与传统CPU处理对比,展示了RGA在高分辨率图像处理中的优势。教程还提供了统一的预处理接口设计,便于在OpenCV与RGA方案间灵活切换,为RK3588平台的深度学习部署提供实用优化方案。
Gmsh+OCC对应版本库编译
输入 GMSH_DLL_EXPORT值C:\LIB\OCCT-7_8_0-i;9、如果只是生成库文件编译gmesh工程即可生成文件在C:\LIB\Gmsh\gmsh-4.13.1-Windows64-B\Debug 下gmsh.dll、gmsh.lib、gmsh.h、gmshc.h文件;3、CMAK编译Gmsh对应OCC版本的,CMAK选择源文件路径C:\LIB\Gmsh\gmsh-4.13.1-source,生成构建文件路径C:\LIB\Gmsh\gmsh-4.13.1-Windows64-B。
手把手教你搭建工业级C#上位机:完整架构+通信+配置+日志,新手也能落地(附全套源码)
模型层是“数据容器”,统一数据格式,避免参数传递混乱。本文搭建的C#上位机,采用“分层+模块化”架构,解耦了UI、通信、配置、日志四大核心功能,不仅满足工业场景的基础需求,还为后续扩展打下基础。新手跟着步骤走,既能掌握上位机的核心开发技能,又能理解工业级项目的架构设计思路。
win10 跳过U8环境检测的IE WebControls.rar
win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。
华为的C语言编程规范.pdf
华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况
主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。
1524
1608
1475

被折叠的 条评论
为什么被折叠?



