相关推荐
【电子学会】2021年12月Python三级 -- 编程题37
n个灯排成一排,开始时都是关着的。现进行如下操作:所有电灯的按钮按动一次;所有编号为2的倍数的电灯按钮按动一次;所有编号为3的倍数的电灯的按钮按动一次;…… 所有编号为n-1的倍数的电灯的按钮按动一次;所有编号为n的倍数的电灯的按钮按动一次。最后请统计有多少只电灯是亮的。编写程序实现上述功能,或补全代码。
2021年6月电子学会Python等级考试试卷(三级)考题解析
青少年软件编程(Python)等级考试试卷(三级) 分数:100.00 题数:38 一、单选题(共25题,每题2分,共50分) 1. 关于open()函数的参数,下列描述正确的是?( ) A、"w+" 以十六进制格式打开一个文件只用于写入 B、"r+"打开一个文件用于读写。文件指针将会放在文件的末尾 C、"w" 打开一个文件只用于写入。如果该文件已存在则打开文件,并从原有位置开始编辑,即保留原有内容。如果该文件不存在,创建新文件 D、"r" 以只读方式打开文件,文...
【电子学会】2021年12月Python一级 -- 编程题36
描述:假设孩子的身高完全由爸爸和妈妈的遗传因素决定,预测一下长大后孩子的身高是多少?孩子获得了爸爸妈妈各一半的遗传基因,所以可以用以下公式计算孩子未来的身高。(单位:厘米)孩子未来的身高=(爸爸的身高+妈妈的身高+13乘以性别系数)/2如果是“男孩”,性别系数值为“1”;如果是“女孩”,则性别系数值为“-1”。
【电子学会】2020年12月Python三级 -- 编程题36
输入10个整数,将它们从小到大排序后输出,并给出现在每个元素在原来序列中的位置。输入:输出:请编写程序实现上述功能,或补全代码。
python密码判断 2023年12月青少年编程电子学会python编程等级考试二级真题解析
python密码判断 2023年12月 python编程等级考试级编程题 一、题目要求 1、编程实现 密码判断:编写一段能够实现密码判断功能的代码 程序运行开始后,用户通过键盘输入密码(格式为字符串); 如果密码错误,让用户继续输入密码 如果密码正确,屏幕输出"密码正确,欢迎您!”,并终止循环,结束程序 正确的密码可以在程序中明确,无需用户输入。 2、输入输出 输入描述:输入密码(格式为字符串) 输出描述:输出“密码正确,欢迎您!”
【电子学会】2021年06月Python三级 -- 编程题36
法定节假日是根据各国、各名族的风俗习惯或纪念要求,由国家法律统一规定的用以进行庆祝及度假的休息时间。法定节假日制度是国家政治、经济、文化制度的重要反映,涉及经济社会的多个方面,涉及广大人民群众的切身利益。法定节假日的休假安排,为居民出行购物和休闲提供了时间上的便利,为拉动内需、促进经济增长做出了积极贡献。给出一个2020年的节假日的放假日期CSV文件(vacations.csv),内容示例如下:以第1行为例,1230表示12月30日,0101表示1月1日。
【电子学会】2022年12月Python二级试卷
如果输入的字符串的长度是奇数,就输出字符串最中间的字符。27、Python中,可以通过索引来访问列表、字符串等序列,也可以通过索引对列表中的元素和字符串中的字符进行修改。1、分别取出该字符串的第偶数位的元素(提醒注意:是按照从左往右数的方式确定字符串的位置);(6)当用户输入的字符串长度为偶数时,能正确地截取字符串的最后一个字符并输出;(5)当用户输入的字符串长度为奇数时,能正确地截取字符串最中间的字符并输出;26、字典的元素可以通过键来访问,也可以通过索引(下标)来访问。
【电子学会】2021年12月Python二级 -- 编程题36
日期计算器设计一款日期计算程序,能够实现下面的功能:(1)要求用户分别输入年、月、日(分三次输入);(2)程序自动会根据输入的年月日计算出这一天是这一年的第几天;(3)输出格式为:这是****年的第**天;请输入某年某月某日,通过编程判断这一天是这一年的第几天。友情提示:考试平台暂不支持eval()命令。
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中。不同的人有不同的行走速度。
【电子学会】2021年09月Python三级 -- 编程题36
输入10个数据进行升序排序,并在这有序数据上插入一个数据,使之仍然有序。程序代码如下,请补全。
电子学会2023年3月青少年软件编程python等级考试试卷(三级)真题,含答案解析
1. 十进制数111转换成二进制数是?( )A. 111B. 1111011C. 101111D. 1101111试题编号:20230113-ylx-001试题类型:单选题标准答案:D试题难度:一般试题解析:十进制转二进制,采用除二倒取余数,直到商为0为止。2. 某班有36人,王老师想给每位同学分配一个二进制的学号,那么该学号至少需要多少位( )A. 36B. 5C. 6D. 7试题编号:20230113-ylx-002试题类型:单选题标准答案:C试题难度:较难。
【电子学会】2021年03月Python三级 -- 编程题36
一个四位数,如果在它的左边加一个数字8,就可以得到一个五位数;如果在它的右边加一个数字6,就可以得到另一个五位数,这两个五位数的和是121410。请问原来这个四位数是多少?现在请你编写程序,求出这个四位数。
python队伍出城 青少年编程电子学会python编程等级考试三级真题解析2021年6月
python队伍出城 2021年6月 python编程等级考试三级编程题 难度级别:中等,这题相对而言还是有一点小难度,难在排序,具体主要考查如下: 分析题目和给定的部分代码,找到给定代码的解题思路 int函数:强制将对象转化为整数类型 input函数:从键盘获取对应的输入值 split函数:字符串分隔函数,按给定的字符进行分隔,分隔后的结果为列表类型 appen函数:将元素添加到列表的末尾 for循环:for循环可以遍历任何有序的项及列表元素等等。 if...语句:条件分支语句,不同的条件有不同的处理
【电子学会】2021年03月Python一级 -- 编程题36
绘制如下图形 ,一个正方形,内有三个红点,中间红点在正方形中心。要求如下:(1)正方形边长为200,线条为黑色;(2)圆点的直径均为20 ,填充颜色为红色,画完后隐藏画笔;(3)中间圆点的圆心位置为画布正中心,三个圆心之间距离相隔为40。
【电子学会】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年12月电子协会青少年python考试(三级)
2021年12月电子协会青少年python考试(三级)含答案已整理好格式
全国青少年软件编程(python)等级考试202103真题
全国青少年软件编程(python)等级考试202103真题
浅谈云计算01 | 云计算服务的特点
在当今数字化时代,云计算作为一种强大的技术解决方案,正逐渐改变着企业和个人对信息技术的使用方式。本文将详细探讨云计算的五个主要特点,包括按需自助服务、广泛的网络接入、资源池化、快速弹性伸缩以及可计量服务。
Windows 10 下 Nacos 3.0.2 单机版保姆级安装教程(含JDK 17配置与MySQL 8.0连接避坑)
本文提供Windows 10下Nacos 3.0.2单机版的详细安装教程,涵盖JDK 17配置、MySQL 8.0连接优化及生产级安全设置。通过步骤详解和常见问题解决方案,帮助开发者快速完成Nacos的安装与配置,确保服务发现与配置管理的高效运行。
Avellaneda & Stoikov’s market-making strategy 工程化处理
前2篇文章详细介绍了AS存货模型的做市策略,这次对于这些公式里面一些希腊字母的取值是如何计算的,如何做工程化并应用到生产环境中做一些说明。这个里面有一些重要参数:很直观,可以直接取值的有:s = current market mid price (中间价,也就是【最佳卖价+最佳买价】/2)q = quantity of assets in inventory of base asset (也就是买入多少价值的股票数量)
盘点军工行业软件研发的那些常用GJB标准
GJB5000、2786、438、141、102、8114等...
如何用谷歌插件Apollo.io高效开发客户?手把手教你避开常见坑点
本文详细介绍了如何利用谷歌插件Apollo.io高效开发外贸客户,包括核心功能解析、免费额度最大化利用策略、多插件协同技巧以及常见陷阱规避方法。通过Apollo.io的智能匹配算法和庞大数据库,外贸从业者可以精准锁定目标客户,提升开发效率。
超10万,两台Mac Studio在家就能跑满血DeepSeek,网友:这是性价比最高的大模型一体机
在AI计算领域,没有比这更强的个人电脑了。这要从它的架构说起。对于那些有本地部署满血版DeepSeek需求的用户,目前建议的配置是选购512GB统一内存 + 1TB SSD,搭载M3 Ultra芯片的Mac Studio,官网售价74249元,可以叠加国补、教育优惠、12期分期等,这可能是目前门槛最低、性价比最高的满血版DeepSeek本地部署方案。对于企业而言,尽管Mac Studio确实可以部署6000亿参数的大模型,但在内存带宽、模型精调服务等方面,跟专用的大模型一体机仍有差距,采购需要谨慎评估。
阿里九宫格验证码 (Baxia SecCaptcha) 逆向工程与自动化求解
实现对阿里巴夏 (Baxia) 九宫格点击验证码的全自动求解模式说明依赖浏览器模式通过 Puppeteer/Playwright 控制真实浏览器,享有完整 DOM/Canvas/WASM 环境需要 Chrome/Chromium纯算模式脱离浏览器,通过 HTTP API + Node.js WASM 解密完成求解无需浏览器。
PCL 法线定向【2025最新版】
几种法线定向方法的PCL代码实现。
深度学习工具包 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")
IDEA的使用指南
IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.
Data-Structures-and-Algorithm-Analysis-in-Java.pdf
作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...
订阅专栏 解锁全文
1167



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



