a
=input("请输入一个整数:")
b
=len(a
)
if b
<=2:
print("None")
else:
print(eval(a
[:b
-2]))
a
=eval(input("请输入一个整数:"))
print(a
//100)
print(divmod(a
,100)[0])
a
=input("请输入一个字符串:")
b
=len(a
.split
())
for i
in range(b
):
print(a
.split
()[i
])
days
=["星期一","星期二","星期三","星期四","星期五","星期六","星期日"]
a
=eval(input("请输入一个整数(1至7):"))
print(days
[a
-1])
a
=input("请输入一个自然数:")
b
=a
[::-1]
A
=eval(a
)
B
=eval(b
)
if A
==B
:
print(True)
else:
print(False)
a
=eval(input("请输入一个整数:"))
print("十进制整数
{}的其他进制表示:\
二进制
{},八进制
{},十六进制
{}"
.format(a
,bin(a
),oct(a
),hex(a
)))
转载请注明原文地址:https://tech.qufami.com/read-18510.html