Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson2_diy3
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
5c0c6087
authored
Jul 04, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
020b87bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
test.py
test.py
0 → 100644
View file @
5c0c6087
#1.输入一个数,判断是奇数还是偶数
#2.random模块
#3.随机生成一个0-100的数,猜猜大小
#4.for 循环,用for循环分别输出1-10
#5.用for循环计算1+2+3+...+100的和
#a=input('请输入一个数:')
#运算优先级:括幂乘除余加减,大于小于非与或
#先算括号
#算术运算符:**、*、/、//、%、+、-
#比较运算符:>、<、==、>=、<=、!=
#逻辑运算符:not、and、or
# import random
# a=random.randint(0,100)
# while True:
# b=input('请输入你要猜的数:')
# if b>a:
# print('猜大了')
# sum=0
# for i in range(1,101):
# sum=sum+i
# print(sum)
#打印0-100之间所有的偶数
for
i
in
range
(
0
,
101
):
if
i
%
2
!=
0
:
print
(
i
)
\ No newline at end of file
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