Commit 5fe13965 by BellCodeEditor

auto save

parent 027d3568
message = "诺依,周末一起去看动漫展吧!" import random
import turtle
screen = turtle.Screen()
key = "AKJGDIA……&*(&*(……速度与v非常"
#要加密的语句
message = screen.textinput('提示','请输入加密语句:')
#加密后语句
key_message = ""
# 请对message进行遍历,取出所有元素 noise = "%!&@*#(&*^$#+"
for i in message:
str1 = i
str2 = random.choice(key)
str3 = random.choice(key)
text = str1 + str2 + str3
key_message += text
list_message = list(key_message)
index = random.randint(0,len(key_message))
list_message.insert(index,noise)
fina_message = "".join(list_message)
print(fina_message)
from pyecharts.charts import Line
from pyecharts.charts import Bar
'''
test = ["第1次","第2次","第3次","第4次","第5次","第6次","第7次","第8次","第9次","第10次"]
student1 = [112,120,110,124,129,132,136,139,144,143]
student2 = [128,131,132,129,130,127,129,131,132,128]
student3 = [143,145,140,133,134,126,112,120,114,105]
'''
subjects= ['小贝','诺依','悟空','波奇']
score1 = [92,95,82,88]
score2 = [95,80,93,90]
#创建柱状图对象
bar = Bar()
#传入x轴和y轴的数据
bar.add_xaxis(subjects)
bar.add_yaxis('期中',score1,bar_width=40)
bar.add_yaxis('期末',score2,bar_width=40)
#保存到本地文件
bar.render("期末期中成绩数据图.html")
\ No newline at end of file
from pyecharts.charts import Line
test = ["第1次","第2次","第3次","第4次","第5次","第6次","第7次","第8次","第9次","第10次"]
student1 = [112,120,110,124,129,132,136,139,144,143]
student2 = [128,131,132,129,130,127,129,131,132,128]
student3 = [143,145,140,133,134,126,112,120,114,105]
#创建折线图对象
line = Line()
#传入数值
line.add_xaxis(test)
line.add_yaxis("小贝",student1)
line.add_yaxis("悟空",student2)
line.add_yaxis("八戒",student3)
line.set_global_opts(title_opts={"text":"成绩走势图","subtext":"高254班数学"})
line.render("test.html")
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Awesome-pyecharts</title>
<script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
</head>
<body>
<div id="8cf5fce84f104a1da5c5eee4ae82f71e" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_8cf5fce84f104a1da5c5eee4ae82f71e = echarts.init(
document.getElementById('8cf5fce84f104a1da5c5eee4ae82f71e'), 'white', {renderer: 'canvas'});
var option_8cf5fce84f104a1da5c5eee4ae82f71e = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
"animationEasing": "cubicOut",
"animationDelay": 0,
"animationDurationUpdate": 300,
"animationEasingUpdate": "cubicOut",
"animationDelayUpdate": 0,
"color": [
"#c23531",
"#2f4554",
"#61a0a8",
"#d48265",
"#749f83",
"#ca8622",
"#bda29a",
"#6e7074",
"#546570",
"#c4ccd3",
"#f05b72",
"#ef5b9c",
"#f47920",
"#905a3d",
"#fab27b",
"#2a5caa",
"#444693",
"#726930",
"#b2d235",
"#6d8346",
"#ac6767",
"#1d953f",
"#6950a1",
"#918597"
],
"series": [
{
"type": "line",
"name": "\u5c0f\u8d1d",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
"\u7b2c1\u6b21",
112
],
[
"\u7b2c2\u6b21",
120
],
[
"\u7b2c3\u6b21",
110
],
[
"\u7b2c4\u6b21",
124
],
[
"\u7b2c5\u6b21",
129
],
[
"\u7b2c6\u6b21",
132
],
[
"\u7b2c7\u6b21",
136
],
[
"\u7b2c8\u6b21",
139
],
[
"\u7b2c9\u6b21",
144
],
[
"\u7b2c10\u6b21",
143
]
],
"hoverAnimation": true,
"label": {
"show": true,
"position": "top",
"margin": 8
},
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 0
},
{
"type": "line",
"name": "\u609f\u7a7a",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
"\u7b2c1\u6b21",
128
],
[
"\u7b2c2\u6b21",
131
],
[
"\u7b2c3\u6b21",
132
],
[
"\u7b2c4\u6b21",
129
],
[
"\u7b2c5\u6b21",
130
],
[
"\u7b2c6\u6b21",
127
],
[
"\u7b2c7\u6b21",
129
],
[
"\u7b2c8\u6b21",
131
],
[
"\u7b2c9\u6b21",
132
],
[
"\u7b2c10\u6b21",
128
]
],
"hoverAnimation": true,
"label": {
"show": true,
"position": "top",
"margin": 8
},
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 0
},
{
"type": "line",
"name": "\u516b\u6212",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
"\u7b2c1\u6b21",
143
],
[
"\u7b2c2\u6b21",
145
],
[
"\u7b2c3\u6b21",
140
],
[
"\u7b2c4\u6b21",
133
],
[
"\u7b2c5\u6b21",
134
],
[
"\u7b2c6\u6b21",
126
],
[
"\u7b2c7\u6b21",
112
],
[
"\u7b2c8\u6b21",
120
],
[
"\u7b2c9\u6b21",
114
],
[
"\u7b2c10\u6b21",
105
]
],
"hoverAnimation": true,
"label": {
"show": true,
"position": "top",
"margin": 8
},
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 0
}
],
"legend": [
{
"data": [
"\u5c0f\u8d1d",
"\u609f\u7a7a",
"\u516b\u6212"
],
"selected": {
"\u5c0f\u8d1d": true,
"\u609f\u7a7a": true,
"\u516b\u6212": true
},
"show": true,
"padding": 5,
"itemGap": 10,
"itemWidth": 25,
"itemHeight": 14
}
],
"tooltip": {
"show": true,
"trigger": "item",
"triggerOn": "mousemove|click",
"axisPointer": {
"type": "line"
},
"showContent": true,
"alwaysShowContent": false,
"showDelay": 0,
"hideDelay": 100,
"textStyle": {
"fontSize": 14
},
"borderWidth": 0,
"padding": 5
},
"xAxis": [
{
"show": true,
"scale": false,
"nameLocation": "end",
"nameGap": 15,
"gridIndex": 0,
"inverse": false,
"offset": 0,
"splitNumber": 5,
"minInterval": 0,
"splitLine": {
"show": false,
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
}
},
"data": [
"\u7b2c1\u6b21",
"\u7b2c2\u6b21",
"\u7b2c3\u6b21",
"\u7b2c4\u6b21",
"\u7b2c5\u6b21",
"\u7b2c6\u6b21",
"\u7b2c7\u6b21",
"\u7b2c8\u6b21",
"\u7b2c9\u6b21",
"\u7b2c10\u6b21"
]
}
],
"yAxis": [
{
"show": true,
"scale": false,
"nameLocation": "end",
"nameGap": 15,
"gridIndex": 0,
"inverse": false,
"offset": 0,
"splitNumber": 5,
"minInterval": 0,
"splitLine": {
"show": false,
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
}
}
}
],
"title": {
"text": "\u6210\u7ee9\u8d70\u52bf\u56fe",
"subtext": "\u9ad8254\u73ed\u6570\u5b66"
}
};
chart_8cf5fce84f104a1da5c5eee4ae82f71e.setOption(option_8cf5fce84f104a1da5c5eee4ae82f71e);
</script>
</body>
</html>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Awesome-pyecharts</title>
<script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
</head>
<body>
<div id="4682b09731a44d4aa8119aab4b82f053" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_4682b09731a44d4aa8119aab4b82f053 = echarts.init(
document.getElementById('4682b09731a44d4aa8119aab4b82f053'), 'white', {renderer: 'canvas'});
var option_4682b09731a44d4aa8119aab4b82f053 = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
"animationEasing": "cubicOut",
"animationDelay": 0,
"animationDurationUpdate": 300,
"animationEasingUpdate": "cubicOut",
"animationDelayUpdate": 0,
"color": [
"#c23531",
"#2f4554",
"#61a0a8",
"#d48265",
"#749f83",
"#ca8622",
"#bda29a",
"#6e7074",
"#546570",
"#c4ccd3",
"#f05b72",
"#ef5b9c",
"#f47920",
"#905a3d",
"#fab27b",
"#2a5caa",
"#444693",
"#726930",
"#b2d235",
"#6d8346",
"#ac6767",
"#1d953f",
"#6950a1",
"#918597"
],
"series": [
{
"type": "bar",
"name": "\u5c0f\u8d1d\u7684\u6210\u7ee9",
"legendHoverLink": true,
"data": [
88,
95,
96,
94,
71,
80,
90,
92,
99
],
"showBackground": false,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true,
"zlevel": 0,
"z": 2,
"label": {
"show": true,
"position": "top",
"margin": 8
}
}
],
"legend": [
{
"data": [
"\u5c0f\u8d1d\u7684\u6210\u7ee9"
],
"selected": {
"\u5c0f\u8d1d\u7684\u6210\u7ee9": true
}
}
],
"tooltip": {
"show": true,
"trigger": "item",
"triggerOn": "mousemove|click",
"axisPointer": {
"type": "line"
},
"showContent": true,
"alwaysShowContent": false,
"showDelay": 0,
"hideDelay": 100,
"textStyle": {
"fontSize": 14
},
"borderWidth": 0,
"padding": 5
},
"xAxis": [
{
"show": true,
"scale": false,
"nameLocation": "end",
"nameGap": 15,
"gridIndex": 0,
"inverse": false,
"offset": 0,
"splitNumber": 5,
"minInterval": 0,
"splitLine": {
"show": false,
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
}
},
"data": [
"\u8bed\u6587",
"\u6570\u5b66",
"\u82f1\u8bed",
"\u5730\u7406",
"\u5386\u53f2",
"\u653f\u6cbb",
"\u751f\u7269",
"\u5316\u5b66",
"\u7269\u7406"
]
}
],
"yAxis": [
{
"show": true,
"scale": false,
"nameLocation": "end",
"nameGap": 15,
"gridIndex": 0,
"inverse": false,
"offset": 0,
"splitNumber": 5,
"minInterval": 0,
"splitLine": {
"show": false,
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
}
}
}
]
};
chart_4682b09731a44d4aa8119aab4b82f053.setOption(option_4682b09731a44d4aa8119aab4b82f053);
</script>
</body>
</html>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Awesome-pyecharts</title>
<script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
</head>
<body>
<div id="33752eec92064af2907271be6edb6a1b" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_33752eec92064af2907271be6edb6a1b = echarts.init(
document.getElementById('33752eec92064af2907271be6edb6a1b'), 'white', {renderer: 'canvas'});
var option_33752eec92064af2907271be6edb6a1b = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
"animationEasing": "cubicOut",
"animationDelay": 0,
"animationDurationUpdate": 300,
"animationEasingUpdate": "cubicOut",
"animationDelayUpdate": 0,
"color": [
"#c23531",
"#2f4554",
"#61a0a8",
"#d48265",
"#749f83",
"#ca8622",
"#bda29a",
"#6e7074",
"#546570",
"#c4ccd3",
"#f05b72",
"#ef5b9c",
"#f47920",
"#905a3d",
"#fab27b",
"#2a5caa",
"#444693",
"#726930",
"#b2d235",
"#6d8346",
"#ac6767",
"#1d953f",
"#6950a1",
"#918597"
],
"series": [
{
"type": "bar",
"name": "\u671f\u4e2d",
"legendHoverLink": true,
"data": [
92,
95,
82,
88
],
"showBackground": false,
"barWidth": 40,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true,
"zlevel": 0,
"z": 2,
"label": {
"show": true,
"position": "top",
"margin": 8
}
},
{
"type": "bar",
"name": "\u671f\u672b",
"legendHoverLink": true,
"data": [
95,
80,
93,
90
],
"showBackground": false,
"barWidth": 40,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true,
"zlevel": 0,
"z": 2,
"label": {
"show": true,
"position": "top",
"margin": 8
}
}
],
"legend": [
{
"data": [
"\u671f\u4e2d",
"\u671f\u672b"
],
"selected": {
"\u671f\u4e2d": true,
"\u671f\u672b": true
}
}
],
"tooltip": {
"show": true,
"trigger": "item",
"triggerOn": "mousemove|click",
"axisPointer": {
"type": "line"
},
"showContent": true,
"alwaysShowContent": false,
"showDelay": 0,
"hideDelay": 100,
"textStyle": {
"fontSize": 14
},
"borderWidth": 0,
"padding": 5
},
"xAxis": [
{
"show": true,
"scale": false,
"nameLocation": "end",
"nameGap": 15,
"gridIndex": 0,
"inverse": false,
"offset": 0,
"splitNumber": 5,
"minInterval": 0,
"splitLine": {
"show": false,
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
}
},
"data": [
"\u5c0f\u8d1d",
"\u8bfa\u4f9d",
"\u609f\u7a7a",
"\u6ce2\u5947"
]
}
],
"yAxis": [
{
"show": true,
"scale": false,
"nameLocation": "end",
"nameGap": 15,
"gridIndex": 0,
"inverse": false,
"offset": 0,
"splitNumber": 5,
"minInterval": 0,
"splitLine": {
"show": false,
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
}
}
}
]
};
chart_33752eec92064af2907271be6edb6a1b.setOption(option_33752eec92064af2907271be6edb6a1b);
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment