Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson1_2
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
785bc710
authored
Aug 19, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
c6188a1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
6 deletions
snake.py
snake.py
View file @
785bc710
import
pygame
'''
问题描述:
生活水平的提高和儿童健康体质并没有齐头并进,肥胖率的上升,体检合格率的下降,足以引起社会和家长对孩子健康发育的重视。本程序旨在帮助家长运用标准身高体重计算公式了解孩子是否符合标准(适用于2-12岁儿童)。
按足岁年龄计算:
儿童的标准身高=年龄×5+75(厘米)
儿童的标准体重=年龄×2+8(公斤)
# 初始化pygame,为使用pygame做准备
pygame
.
init
()
输入格式:
?输入一个数字,代表该儿童的足岁年龄。
(输入使用input(),并有相应提示信息)
输出格式:
输出该儿童的标准身高和体重值。
(输出使用print(),分两行输出,并有相应提示信息)
# 创建一个窗口
??
\ No newline at end of file
由于技术原因,平台不支持eval计算(系统会报错),如有使用,阅卷老师会人工处理。
说明:
1.参考程序仅供参考,学生可以有多个解决方法。如果学生使用格式输出的方式,只要结果符合要求即为正确。
2.建议将每一个考生的程序最少运行测试一次。
评分标准:
(1)有输入语句并且有清楚的提示字符串;(1分)
(2)有输出语句并且按照题意输出;(2分)
(3)有类型转化语句;(1分)
(4)有计算语句;(两个各2分,共4分)
(5)程序符合题目要求。(2分)
'''
num
=
int
(
input
(
'请输入孩子的足岁年龄:'
))
sg
=
num
*
5
+
75
tz
=
num
*
2
+
8
print
(
'该儿童的标准身高为:'
,
sg
)
print
(
'该儿童的标准体重为:'
,
tz
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment