相关推荐
2022年3月电子学会Python等级考试试卷(一级)答案解析
青少年软件编程(Python)等级考试试卷(一级) 分数:100题数:37 一、单选题(共25题,共50分) 1. 已知a="161",b="16",c="8",执行语句d=a>b and a>c,变量d的值为是?( ) A. 0 B. 1 C. True D. False 试题编号:20200310-fjn-007 试题类型:单选题 标准答案:D 试题难度:较难 试题解析:本题考查的是字符串+运算。字符串+表示将后面的字符串拼接在前面的字符串中。 考生答案:C..
2022年3月电子学会青少年编程Python等级考试一级真题解析(Python一级)
2022年3月电子学会青少年编程Python等级考试一级真题解析(Python一级),青少年软件编程(Python)等级考试试卷(一级),选择题
2022年3月电子学会Python等级考试试卷(二级)答案解析
目录 青少年软件编程(Python)等级考试试卷(二级) 分数:100题数:37 一、单选题(共25题,每题2分,共50分) 1. 关于Python中的列表,下列描述错误的是?( ) 2. 已知列表a=[1,3,5,7],下列语句无法将a变成a=[1,3,5,7,9]的是?( ) 3. 关于以下代码段的说法错误的是?( ) 4. 下面程序的运行结果是?( ) 5. 以下关于元组的描述正确的是?( ) 6. 以下程序的输出结果是?( ) 7. 以下代码的输出结果是?( ) 8. 以下..
【电子学会】2021年09月Python一级 -- 编程题36
计算题:龟兔赛跑,兔子刚开始跑得非常快,但是兔子太骄傲了,在领先乌龟100米时,自行休息睡着了,乌龟一步一步进行追赶,乌龟的速度是 V m/s(V < 10),请计算出乌龟多长时间就可以追上兔子呢?要求:(1)程序开始运行时,询问请输入乌龟爬行的速度,输入一个数字;(2)程序根据输入的数字计算出乌龟需要多长时间就可以追上兔子;(3)输出的格式为:“乌龟能够追上兔子所需的时间是:*秒。
【电子学会】2022年03月Python一级 -- 编程题36
计算题:买本子:小明同学带了一些钱去帮同学们买本子。请根据所带的元数、单价和数量,算一算钱够不够。要求:(1) 程序运行后,输入三次数字(不能一次输完),这三个数字为整数,表示所带的元数(钱数)、本子的单价和数量;(2) 输出一行,钱足够买就输出"True",钱不够买就输出"False"(不要输出引号)。
【电子学会】2021年06月Python一级 -- 编程题36
求长方形的面积与周长。要求:(1)程序开始运行后,输入长方形的长(a),然后再输入长方形的宽(b);(2)程序会根据输入的数字给出长方形的面积和长方形的周长;(3)输出长方形的面积和周长,并且注明是面积还是和周长。
2021年12月电子学会Python等级考试试卷(三级)答案解析
需要所有考级相关的资料可以添加我的微信:15570666506 青少年软件编程(Python)等级考试试卷(三级) 分数:100题数:38 总体情况 一、单选题(共25题,共50分) 1. 小明在学习计算机时,学习到了一个十六进制数101,这个十六进制数对应的十进制数的数值是?( ) A. 65 B. 66 C. 256 D. 257 试题编号:20200313-tsn-04 试题类型:单选题 标准答案:D 试题难度:容易 ...
【电子学会】2022年06月Python一级 -- 编程题36
天狗吃月亮”是一个古老的神话,以前古人不了解月食这一现象,所以说月亮被狗吃了,天狗吃月亮是古人对“月食”这一天文现象的简称。月食是自然界的一种现象,当太阳、地球、月球三者恰好或几乎在同一条直线上时(地球在太阳和月球之间),太阳到月球的光线便会部分或完全地被地球遮挡,产生月食。请你设计一段程序完成下列图片的月食现象。要求:(1)海龟的初始位置的坐标为(0,0),月食现象的图片需在整个画布中完整呈现;(2)月食现象由两个圆或点组成,分别为半径不同的黄色和白色的圆或点;
【电子学会】2020年06月Python一级 -- 编程题36
画出下面示意图形,要求如下:(1)画出如下的图形,注:直线部分是由两个步长为200的线段垂直相交组成。(2)圆的直径为200;(3)图形的中心位置为画布中心;(4)画笔宽度为2,颜色为红色。
2022年9月电子学会青少年编程Python等级考试一级真题解析(Python一级)
2022年9月电子学会青少年编程Python等级考试一级真题解析(Python一级),判断题和编程题
【电子学会】2023年03月Python三级试卷
在选择排序中,外循环控制排序趟数,内循环控制排序次数,不难看出,i的取值范围为0~n-2,因此j每次从i的下一个位置开始至最后,故②处填写i+1;若要生成一个由若干小写字母组成的互不重复的随机数组,已知小写字母的ASCII码值为97~122整数范围,并将其进行从小到大输出,如图所示,请将相关程序补充完整。24、在交互式编程环境下,输入 max([(1, 2), (2, 3), (3, 4), (2, 6)]) 语句,执行的结果是?在Python交互式编程环境下执行以下语句,会出现错误的一项是?
2021年6月电子学会Python等级考试试卷(三级)考题解析
青少年软件编程(Python)等级考试试卷(三级) 分数:100.00 题数:38 一、单选题(共25题,每题2分,共50分) 1. 关于open()函数的参数,下列描述正确的是?( ) A、"w+" 以十六进制格式打开一个文件只用于写入 B、"r+"打开一个文件用于读写。文件指针将会放在文件的末尾 C、"w" 打开一个文件只用于写入。如果该文件已存在则打开文件,并从原有位置开始编辑,即保留原有内容。如果该文件不存在,创建新文件 D、"r" 以只读方式打开文件,文...
【电子学会】2021年03月Python三级 -- 编程题36
一个四位数,如果在它的左边加一个数字8,就可以得到一个五位数;如果在它的右边加一个数字6,就可以得到另一个五位数,这两个五位数的和是121410。请问原来这个四位数是多少?现在请你编写程序,求出这个四位数。
2022年03月电子学会Python编程等级考试一级真题及答案
2022年03月电子学会Python编程等级考试一级真题及答案
基于阻抗控制的工业机器人轨迹跟踪系统 Simulink/Simscape 仿真
本文是对文献 [1] 的复现。 关于阻抗控制 阻抗控制的提出可以追溯到 1984 年,Neville Hogan 在 American Control Conference 发表的 Impedance Control:An Approach to Manipulation ,次年,Hogan N. 又在 Journal of Dynamic Systems Measurement and Control-transactions of The Asme 发表了阻抗控制经典三部曲 —— Imped.
Flocking for Multi-Agent Dynamic Systems: Algorithms and Theory的理论简述和python仿真实现(附源码)
经典论文Flocking for Multi-Agent Dynamic Systems: Algorithms and Theory的学习与编程仿真,提供源码
智慧工地算法视频分析服务器区域入侵检测AI视频分析技术在煤矿的实战应用
通过实时分析和处理井下视频资料,智慧矿山算法视频分析服务器不仅能够及时发现并预警人员违规行为和设备异常状况,还能够通过智能分析预防潜在的安全风险,从而显著提高煤矿的安全管理水平和生产效率。
手把手教你用QEMU虚拟化华为路由器固件(附完整网络配置指南)
本文提供了一份详尽的QEMU虚拟化华为路由器固件的实战指南。从固件解包、网络桥接配置到QEMU虚拟机启动,手把手教你搭建完整的嵌入式设备沙箱环境,特别适合安全研究、逆向分析和学习嵌入式系统工作原理。
Halcon阈值算子 -- 局部阈值之dyn_threshold
Halcon阈值算子 – dyn_threshold HALCON有很多阈值算子,接下来将一一介绍。本文先介绍dyn_threshold。 以下介绍主要参考HALCON帮助文档,并加上自己的体会。如有纰漏,欢迎留言指出 理论介绍 dyn_threshold算子的函数签名如下: dyn_threshold(OrigImage, ThresholdImage : RegionDynThresh : Offset, LightDark : ) 输入参数有: OrigImage:待处理图像 ThresholdIm
从服务器到桌面超算:当3999美元的NVIDIA DGX Spark装上Ubuntu,普通开发者能玩出什么花?
DGX Spark的出现,标志着AI算力正在经历从"数据中心集中供给"到"个人桌面按需拥有"的范式转移。它让开发者可以在本地完成从数据预处理、模型微调到推理验证的全流程,只有在需要大规模训练时才调用云端资源。迭代速度:从按小时计费的云端调试,变成随时随地的本地实验数据主权:敏感信息永不离开本地成本可控:一次投入,长期使用,不受API调用次数限制AI算力民主化的时代,真的来了。你的下一台超级计算机,不必在云端。它就在你的桌面上,安静地等待着你的下一个创意。附录:实用资源。
基于学术研究于NASA官网GPM卫星数据下载详细教程
基于学术研究于NASA官网GPM卫星数据下载详细教程
基于Python的农业市场价格抓取与供需分析:现代爬虫技术与实战应用
在正式开始爬虫开发之前,我们首先了解爬虫的基本概念和工作原理。爬虫(Web Scraping)是通过编程的方式,自动从互联网上获取信息的技术。它可以帮助我们提取HTML页面中的特定数据,通常用于收集并处理大量信息。发送HTTP请求:爬虫需要向目标网站发送请求,获取网站的HTML页面内容。解析HTML页面:通过HTML解析器对获取的页面内容进行解析,提取其中需要的数据。数据清洗与存储:将提取的数据进行清洗,去除多余的字符或无关内容,然后存储到合适的格式(如CSV文件、数据库等)中。数据分析与可视化。
温度PID控制PLC程序
温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值
数学建模模型总结
这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!
SAP B1中文培訓教材_SDK
公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说
深度学习工具包 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")

订阅专栏 解锁全文
9190



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



