Python表达式
编辑日期: 2024-07-20 文章阅读: 440 次
欢迎来到Python表达式练习题,15
题,在线答题页面!
全选择题
,带有解析。
做过题会缓存
,方便随时复习。
以下代码执行后,x的值是多少?
x = 10
x += 5
x *= 2
以下代码将会输出什么?
def func():
return 2 * 3
result = func()
以下代码段的作用是什么?
fruits = ['apple', 'banana', 'cherry']
if 'banana' in fruits:
print('Found')
以下代码执行后,变量count的最终值是什么?
count = 0
for i in range(5):
count += i
以下代码中,哪个选项是正确的语法?
if x = 10:
print('x is 10')