- a,d
- c,d
- 以下表达式 10 / 4 + 23 // 4 * 2 - 30的计算结果是:-17.5
content = (input('请输入:'))
len_content = len(content)
content = int(content)
while len_content >= 1:
print(content // 10 ** (len_content - 1), end=',')
content = content % 10 ** (len_content - 1)
len_content = len_content - 1
content = int(input('请输入:'))
if content % 3 == 0 and content % 7 == 0:
print(content, '能够被3和7同时整除')
else:
print(content, '不能被3和7同时整除')
```
content = int(input('请输入:'))
if (content % 3 == 0 or content % 7 == 0) and not(content % 3 == 0 and content % 7 == 0):
print(content, '能够被3或7同时整除,但是不能被3和7同时整除')
else:
print('违背题目要求')
seconds = 1500
minutes = seconds / 60
hours = seconds / 3600
print('今天上课的时间是', '%.2f' % minutes, '分,', '%.2f' % hours, '小时,', seconds, '秒')
high = float(input('请输入身高(m):'))
height = float(input('请输入体重(kg):'))
num = height / high ** 2
if 18.5 <= num <= 24.9:
print(True)
else:
print('对不起,你的身材不是很理想')
-
运行结果:
10.png
网友评论