首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
ciphersaw
广东青年管理干部学院
2000届
安全工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(81)
Assuming the filename for the code below is /usr/lib/python/person.py and the program is run as: python /usr/lib/python/per
82
在 Python2 的解释环境下,正确的输出应该为:__main__ 题目本身排版有误,最后两条语句不能放在同一行,直接运行报语法错误: SyntaxError: invalid syntax 运行正确的排版应该为: class Person: def __init__(self): ...
发表于 2018-01-11 21:49:01
what gets printed? Assuming python version 2.x() print type(1/2)
282
Python2 中除法默认向下取整,因此 1/2 = 0,为整型。 For (plain or long) integer division, the result is an integer. The result is always rounded towards minus inf...
发表于 2018-01-11 11:05:05
What gets printed?()
181
set 类型的特性是会移除集合中重复的元素,因此变量 nums 实际上等于: nums = {1, 2, 3, 4} 因此数据的长度为 4,故选C。详情可参考: 使用dict和set Set Types — set, frozenset
发表于 2018-01-08 16:39:42
以下哪一个不是Python支持的数据类型
40
在 Python 中没有字符类型 char,只有字符串类型 str,即字符也是用 str 类型表示,详情可参考: Text Sequence Type — str Python 变量类型
发表于 2018-01-07 22:10:21
Which numbers are printed?()
83
range()函数的语法如下: range(start, end[, step]) 参数说明: start: 计数从 start 开始。默认是从 0 开始。例如 range(5) 等价于 range(0, 5); end: 计数到 end 结束,但不包括 end。例如:...
发表于 2018-01-07 13:19:37
以下python代码的输出是什么? numbers = [1, 2, 3, 4] numbers.append([5,6,7,8]) print len(numbers)
93
变量 number 是 list 类型,执行完上述语句后其值变为: number = [1, 2, 3, 4, [5, 6, 7, 8]] 所以对于变量 number 而言,共有 5 个元素,即长度为 5,且第 5 个元素也是一个 list,故选 B。
发表于 2018-01-07 13:00:12
给出employees表中排名为奇数行的first_name
110
首先题目的叙述有问题,导致理解有误,输出的数据与参考答案不同。先给出正确的题目叙述:【对于employees表,在对first_name进行排名后,选出奇数排名对应的first_name】。 1、本题用到了三层 SELECT 查询,为了便于理解,采用缩进方式分层,且最外层对应e1,最内层对应e...
发表于 2017-07-25 11:04:46
统计salary的累计和running_total
107
本题的思路为复用 salaries 表进行子查询,最后以 s1.emp_no 排序输出求和结果。 1、输出的第三个字段,是由一个 SELECT 子查询构成。将子查询内复用的 salaries 表记为 s2,主查询的 salaries 表记为 s1,当主查询的 s1.emp_no 确定时,对子查...
发表于 2017-07-25 10:07:29
获取有奖金的员工相关信息。
100
本题主要考查 SQLite 中 CASE 表达式的用法。即当 btype = 1 时,得到 salary * 0.1;当 btype = 2 时,得到 salary * 0.2;其他情况得到 salary * 0.3。详细用法请参考: http://www.sqlite.org/lang...
发表于 2017-07-24 22:35:37
使用含有关键字exists查找未分配具体部门的员工的所有信息。
54
本题用 EXISTS 关键字的方法如下:意为在 employees 中挑选出令(SELECT emp_no FROM dept_emp WHERE emp_no = employees.emp_no)不成立的记录,也就是当 employees.emp_no=10011的时候。反之,把NOT去掉,则输...
发表于 2017-07-24 11:14:27
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题