找回密码
 中文实名注册
查看: 188|回复: 0

3 单元 第6课

[复制链接]

6

主题

37

帖子

613

积分

高级会员

Rank: 4

积分
613
发表于 2022-8-21 17:32:49 | 显示全部楼层 |阅读模式
[Python] 纯文本查看 复制代码
def jump (height,planet):
    if planet ==  '月球':
       result = height * 6
    if planet ==  '火星':
       result = height * 2.5
    if planet ==  '木星':
       result = height * 0.4
    if planet ==  '老八':
       result = height * 1
    sentence = '你可以在' + planet + '跳' + '米'
    print (sentence)
    jump (1,'老八')
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

小黑屋|东台市机器人学会 ( 苏ICP备2021035350号-1;苏ICP备2021035350号-2;苏ICP备2021035350号-3 )

GMT+8, 2024-5-9 15:22 , Processed in 0.041540 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表