Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-1-1_DIY1
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
f0fc9dd8
authored
Nov 27, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
8c3b47cc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
11 deletions
123456789.py
88888888888888.py
dfdgf.py
diy1.py
123456789.py
0 → 100644
View file @
f0fc9dd8
a
=
input
(
"小宋老师出生什么季节"
)
if
a
==
3
or
a
==
4
or
a
==
5
:
print
(
"春天"
)
else
a
==
6
or
a
==
7
or
a
==
8
print
(
"夏天"
)
if
a
==
9
or
a
==
10
or
a
==
11
:
print
(
"秋天"
)
else
:
print
(
"冬天"
)
\ No newline at end of file
88888888888888.py
0 → 100644
View file @
f0fc9dd8
import
random
s
=
random
.
randint
(
0
,
10
)
a
=
random
.
randint
(
0
,
10
)
d
=
random
.
randint
(
0
,
10
)
if
s
==
a
or
a
==
d
or
d
==
s
:
print
(
"中奖了"
)
else
:
print
(
"滚"
)
\ No newline at end of file
dfdgf.py
0 → 100644
View file @
f0fc9dd8
import
random
s
=
random
.
random
()
if
s
<
0.5
:
print
(
"大于零点五"
)
if
s
>
0.5
:
print
(
"小于零点五"
)
if
s
==
0.5
:
print
(
"等于零点五"
)
\ No newline at end of file
diy1.py
View file @
f0fc9dd8
import
turtle
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
pen
.
pengoto
(
-
100
,
0
)
pen
.
pencolor
(
"black"
)
pen
.
write
(
"我是你爸爸"
)
pen
.
hideturtle
()
turtle
.
done
()
import
random
s
=
random
.
randint
(
1
,
100
)
i
=
10
while
i
>
0
:
a
=
int
(
input
(
"小宋老师有多高?"
))
if
a
<
s
:
print
(
"不不不不"
+
"小宋老师高亿点"
)
i
=
i
-
1
elif
a
>
s
:
print
(
"不不不不"
+
"小宋老师矮亿点"
)
i
=
i
-
1
else
:
print
(
"小宋老师就这么高"
)
break
else
:
print
(
"小宋老师太矮了我们猜不到"
)
\ 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