1) What type of error is returned by the following statement? a) ErrorIndentation b) IndentationError c) SpaceError d) No error in the given statement 2) Which keyword is used to define a function in Python? a) def b) deaf c) define d) new 3) Statement below "function definition" begin with spaces called ........... a) Condition b) Definition c) Indentation d) Seperation 4) What will be the output of the following code? a) abc b) Error c) 0 d) No output 5) Which statement will display square of a number(n)? a) print(n*n) b) print(math.pow(n,2) #math module is already imported c) a and b d) print(n,2) 6) Will both the print statements return same output? a) True b) False 7) Write the output of the following code: >>> 7+2//1**2>5+2**2//3 a) True b) False 8) Which of the following assignment operator will return an error? a) a=b=c=89 b) a=6,b=8 c) a,b,c=1,2,3 d) a=12.1,b=12 9) Write the output of the following: a) 8 b) Error c) No Output d) 7 10) 'return' statement is mandatory in function definition? a) True b) False
0%
Python
共享
共享
共享
由
Pdeepti1
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
随堂测验
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?