首页->Python语言基础
下列选项中不符合Python语言变量命名规则的是
(A)TempStr
(B) I
(C)3_1
(D) _AI
参考答案
![微考学堂](/images/gzh.png)
更多Python语言基础试题
- 1使用help()命令可以进入帮助系统。
- 2以下对数值运算操作符描述错误的选项是( )
- 3以下表达式,正确定义了一个集合数据对象的是( )
- 4“人生就像舞台,不到谢幕,永远不会知道自己有多精彩!”小明特别喜欢这句话,怎么才能输出这句话呢?( )
- 5题目:给一个不多于5位的正整数,要求:一、求它是几位数,二、逆序打印出各位数字。
x = int(input("input a number:"))
a = x // 10000
________________
c = x % 1000 // 100
d = x % 100 // 10
e = x % 10
if a != 0:
print ("there are 5 ",e,d,c,b,a)
elif b != 0:
print ("there are 4 ",d,c,b,a)
elif c != 0:
print ("there are 3 ",e,d,c)
elif d != 0:
print ("there are 2 ",e,d)
else:
print ("there are 1",e)