皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
仿照内置的range函数编写一个函数my_range,函数有3个整数参数:start、stop和step(其中step默认值为1),函数的功能是输出一个用空格分隔开的从 start 开始到 stop-1 结束的数字序列,间隔为步长值,为了简单起见,要求 start < stop 、 step > 0 ,如果不符合条件,提示输入有误。 以下是一些函数调用的示例: 如果: my_range(1,10) 则输出: 如果: my_range(1,10,2) 则输出: 如果: my_range(10,1) 则输出: 选做: 完善函数,当 start = stop 、 step = 0 时提示错误信息,当 start > stop ,如果 step < 0 ,则像range函数一样递减输出,否则提示错误信息。注意错误信息应描述清楚错误原因。 请提交代码及运行结果截图。
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【简答题】Australia is the largest island in the world. It is a little smaller than China. It is in the south of the earth. Australia is big, but its population is small. The population of Australia is nearly a...
【简答题】利用Internet实现的讲授型网络教学模式可以分为______和______两种。同步式讲授这种模式除了教师、学生不在同一地点上课之外,学生可在同一时间聆听教师讲课,师生间有一些简单的交流,这与传统教学模式是一样的。异步式讲授只要利用Internet的万维服务及电子邮件服务就可以很简单地实现,这种模式是由教师将教学要求、教学内容以及教学评测等教学材料,编制成HTML 文件,存放在Web服务器上,...
【判断题】企业利润即为生产经营中获得的收入与费用的差值。
A.
正确
B.
错误
【单选题】OT 试验阳性,表示
A.
.机体对结核分枝杆菌产生变态反应
B.
.可以确诊成人结核病
C.
.强阳性表示有严重结核病
D.
.机体不能中和结核菌素
E.
.以上都不是
【多选题】以下打混凝土预制桩一按规定中,哪些做法是正确的:()。
A.
吊桩前应将桩锤提升到一定位置固定牢靠 , 防止吊桩时桩锤坠落。
B.
起吊时吊点必须正确 , 速度要均匀 , 桩身应平稳 , 必要时桩架应设缆风绳。
C.
桩身附着物要清除干净 , 起吊后 , 人员不准在桩下通过。
D.
吊桩与运桩发生干扰时 , 应停止运桩。
E.
插桩时,手脚严禁伸入桩与龙门之间。
【简答题】A positive ion is therefore smaller than the corresponding and the more electrons removed (that is, the greater the charge on the ion), the smaller it becomes.
【简答题】Australia is the smallest continent in the world. It is a little smaller than China. It is on the Southern Hemisphere of the earth. Australia is big, but its population is small. The population of Aus...
【简答题】Australia is the smallest continent in the world. It is a little smaller than China. It is on the Southern Hemisphere(半球)of the earth. Australia is big, but its population is small. The population of ...
【单选题】在PowerPoint的幻灯片浏览窗格中,选定某幻灯片缩略图并拖动,可以完成的操作是( )。
A.
移动幻灯片
B.
复制幻灯片
C.
删除幻灯片
D.
选定幻灯片
【单选题】OT试验阳性,表示( )
A.
机体对结核杆菌产生变态反应
B.
可以确诊成人结核病
C.
强阳性表示有严重结核病
D.
机体不能中和结核菌素
E.
以上都不是
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题