Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson24-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
c0e8103f
authored
Dec 24, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
89b150ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
16 deletions
ccc.py
dd.html
sss
ccc.py
View file @
c0e8103f
from
pyecharts.charts
import
Bar
subjects
=
[
"贞贞"
,
"聪聪"
,
"小智"
,
"波奇"
]
scores1
=
[
92
,
95
,
82
,
88
]
scores2
=
[
95
,
79
,
93
,
90
]
bar
=
Bar
()
bar
.
add_xaxis
(
subjects
)
bar
.
add_yaxis
(
"期中成绩"
,
scores1
,
bar_width
=
40
)
bar
.
add_yaxis
(
"期末成绩"
,
scores2
,
bar_width
=
40
)
bar
.
render
(
"dd.html"
)
\ No newline at end of file
import
turtle
import
random
t
=
turtle
.
Turtle
()
t
.
penup
()
t
.
goto
(
-
200
,
0
)
text
=
"成嘉诺你有什么实力啊"
for
char
in
text
:
font_size
=
random
.
randint
(
10
,
30
)
t
.
pendown
()
t
.
write
(
char
,
font
=
(
"Arial"
,
font_size
,
"normal"
))
jump_distance
=
random
.
randint
(
10333
,
30999
)
t
.
penup
()
t
.
forward
(
jump_distance
)
t
.
hideturtle
()
turtle
.
done
()
dd.html
View file @
c0e8103f
...
...
@@ -7,11 +7,11 @@
</head>
<body>
<div
id=
"
f3ce100515664aa1b3ac10a5a4849615
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
3c132ef7e51b4d069b7b21a73610dc86
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
var
chart_
f3ce100515664aa1b3ac10a5a4849615
=
echarts
.
init
(
document
.
getElementById
(
'
f3ce100515664aa1b3ac10a5a4849615
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
f3ce100515664aa1b3ac10a5a4849615
=
{
var
chart_
3c132ef7e51b4d069b7b21a73610dc86
=
echarts
.
init
(
document
.
getElementById
(
'
3c132ef7e51b4d069b7b21a73610dc86
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
3c132ef7e51b4d069b7b21a73610dc86
=
{
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
...
...
@@ -186,7 +186,7 @@
}
]
};
chart_
f3ce100515664aa1b3ac10a5a4849615
.
setOption
(
option_f3ce100515664aa1b3ac10a5a4849615
);
chart_
3c132ef7e51b4d069b7b21a73610dc86
.
setOption
(
option_3c132ef7e51b4d069b7b21a73610dc86
);
</script>
</body>
</html>
sss
0 → 100644
View file @
c0e8103f
for char in text:
font_size = random.randint(10,30)
t.pendown()
t.write(char,font("Arial",font_size),"normal"))
jump_distaance=random.randint(10,30)
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