Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-5-2_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
fb991fc3
authored
Jul 09, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
f9b6bca9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
7 deletions
1.py
2.py
3.py
bug.py
pp.py
1.py
0 → 100644
View file @
fb991fc3
a
=
int
(
input
())
b
=
int
(
input
())
sum
=
0
for
i
in
range
(
a
,
b
+
1
):
if
i
%
2
==
1
:
sum
=
sum
+
i
print
(
sum
)
\ No newline at end of file
2.py
0 → 100644
View file @
fb991fc3
a
=
int
(
input
())
b
=
int
(
input
())
print
(
a
//
b
,
a
%
b
,
end
=
" "
)
\ No newline at end of file
3.py
0 → 100644
View file @
fb991fc3
# a={22,2,3,4,2,3,4,34}
# print(a)
a
=
"dsfs fdjf fdsf"
for
i
in
a
.
split
(
" "
):
print
(
i
)
\ No newline at end of file
bug.py
View file @
fb991fc3
# 悟空想画个六芒星魔法阵,主要的代码已写出,但这有bug,请你帮忙调试下~
import
turtle
pen
=
turtle
.
Pen
()
size
=
textinput
(
"提示"
,
"你想要多大的魔法阵呀?"
)
pen
.
circle
(
size
)
pen
.
circle
(
size
,
360
,
3
)
pen
.
circle
(
size
,
60
)
pen
.
circle
(
size
,
360
,
3
)
size
=
turtle
.
textinput
(
"提示"
,
"你想要多大的魔法阵呀?"
)
size
=
int
(
size
)
turtle
.
fillcolor
(
"red"
)
turtle
.
circle
(
size
)
turtle
.
begin_fill
()
turtle
.
circle
(
size
,
360
,
steps
=
10
)
turtle
.
end_fill
()
turtle
.
circle
(
size
,
60
)
turtle
.
circle
(
size
,
360
,
6
)
turtle
.
hideturtle
()
turtle
.
done
()
pp.py
0 → 100644
View file @
fb991fc3
a1
=
input
(
'指挥你认罪吗?请回答认罪或者不认:'
)
a2
=
input
(
'柴可夫斯基你认罪吗?请回答认罪或者不认:'
)
if
a1
==
a2
==
'认罪'
:
print
(
'都判 10 年'
)
elif
a1
==
a2
==
'不认'
:
print
(
'都判 3 年'
)
if
a1
==
'认罪'
and
a2
==
'不认'
:
print
(
'指挥判 1 年,柴可夫斯基判 20 年'
)
elif
a1
==
'不认'
and
a2
==
'认罪'
:
print
(
'指挥判 20 年,柴可夫斯基判 1 年'
)
\ 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