Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson1_1
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
b9cd2053
authored
Oct 15, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
db4ec920
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
1.py
count.py
redyellowblue.py
1.py
0 → 100644
View file @
b9cd2053
import
turtle
a
=
turtle
.
Pen
()
a
.
penup
()
a
.
speed
(
5
)
a
.
color
(
"green"
)
a
.
setpos
(
0
,
200
)
a
.
pendown
()
a
.
fillcolor
(
"black"
)
a
.
begin_fill
()
a
.
right
(
60
)
a
.
forward
(
100
)
a
.
right
(
120
)
a
.
forward
(
100
)
a
.
right
(
120
)
a
.
forward
(
100
)
#turtle是库,Pen是类,done是函数,done让我们的画布不断出现
\ No newline at end of file
count.py
0 → 100644
View file @
b9cd2053
print
(
"hello world"
)
\ No newline at end of file
redyellowblue.py
0 → 100644
View file @
b9cd2053
import
random
#调用random模块
a
=
random
.
choice
([
'red'
,
'yellow'
,
'blue'
])
print
(
a
)
while
True
:
b
=
random
.
choice
([
'red'
,
'yellow'
,
'blue'
])
if
b
!=
a
:
break
print
(
b
)
c
=
random
.
choice
([
'red'
,
'yellow'
,
'blue'
])
while
True
:
c
=
random
.
choice
([
'red'
,
'yellow'
,
'blue'
])
if
c
!=
a
and
c
!=
b
:
break
print
(
c
)
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