有没有代码少的方法,最好有思路
https://thumbnail1.baidupcs.com/thumbnail/5b20f7fadhbe42f30be05c5c3967ead6?fid=1590253992-250528-217029073756086&rt=pr&sign=FDTAER-DCb740ccc5511e5e8fedcff06b081203-1DxsEFoikL7NKUaRbycvAhk2whA%3d&expires=8h&chkbd=0&chkv=0&dp-logid=275066182291756838&dp-callid=0&time=1672052400&size=c1463_u915&quality=90&vuk=1590253992&ft=image&autopolicy=1http://jpoj.top/uploads/20190926/15694852073316.jpg
小弟实在想不到了 https://thumbnail1.baidupcs.com/thumbnail/e389dd934odc4028f053f780079c2fec?fid=1590253992-250528-421166726222393&rt=pr&sign=FDTAER-DCb740ccc5511e5e8fedcff06b081203-JylMRSbDL22aa%2b1utKtOBgvaVZU%3d&expires=8h&chkbd=0&chkv=0&dp-logid=275107582318719273&dp-callid=0&time=1672056000&size=c1463_u915&quality=90&vuk=1590253992&ft=image&autopolicy=1 题目叫啥,用啥语言写 Mike_python小 发表于 2022-12-26 20:10
题目叫啥,用啥语言写
题目是大学体测:仰卧起坐与引体向上
用python写 https://blog.csdn.net/m0_47384542/article/details/124411406 Mike_python小 发表于 2022-12-26 21:02
https://blog.csdn.net/m0_47384542/article/details/124411406
{:5_94:} 爱意随风起9306 发表于 2022-12-26 21:09
去看博客,有说明{:5_94:} Mike_python小 发表于 2022-12-26 21:10
去看博客,有说明
看不懂,那个不是java的吗 Mike_python小 发表于 2022-12-26 21:10
去看博客,有说明
除了重复一遍题目,啥也没有 sex = int(input())
grade = int(input())
count = int(input())
# 根据输入的性别,年级,生成一张等级表
level_table = [
10 + sex * 16 + (grade - 12) // 22,
15 + sex * 31 + (grade - 12) // 22,
17 + sex * 35 + (grade - 12) // 22,
]
level = 0
# 根据引体向上的个数和等级表累加等级
for score in level_table:
if count >= score:
level += 1
else:
break# 当引体向上的个数小于对应等级的分数时退出循环
print(level)
lvk 发表于 2022-12-26 21:34
https://thumbnail1.baidupcs.com/thumbnail/b1fbe1f25v9a1eaca27f4729b5e26e75?fid=1590253992-250528-604641666887807&rt=pr&sign=FDTAER-DCb740ccc5511e5e8fedcff06b081203-KyLAaczcvg2%2fAmeqQ%2fUVyA6D2ds%3d&expires=8h&chkbd=0&chkv=0&dp-logid=292362130796656129&dp-callid=0&time=1672117200&size=c1463_u915&quality=90&vuk=1590253992&ft=image&autopolicy=1 lvk 发表于 2022-12-26 21:34
没事了,已经调试好了
页:
[1]