酷代码 AI
菜单
服务商
DeepSeek字节豆包讯飞星火
更多选项

Python 编程:计算球第 10 次落地经过距离与反弹高度

```python h = int(input()) total_distance = h # 第一次下落的距离 next_height = h / 2 # 第一次反弹的高度 for i in range(2, 11): total_distance += next_height * 2 next_height /= 2 print(total_distance) print(next_height) ``` ######[AI写代码神器 | 159点数解答 | 2024-12-02 20:29:04]

相关提问
本站限时免费提问中
实用工具查看更多
Linux在线手册 [开发类]
Jquery在线手册 [开发类]
今日油价 [生活类]
图片互转base64 [开发类]
时间转换器 [开发类]