Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson7_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
df448f77
authored
Jan 22, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
7317e213
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
a.py
diy5.py
a.py
0 → 100644
View file @
df448f77
students
=
[
"悟空"
,
"小贝"
,
"八戒"
,
"波奇"
]
students
.
remove
(
"八戒"
)
students
.
insert
(
1
,
"诺伊"
)
diy5.py
View file @
df448f77
import
random
# 私钥
key
=
"abcdefgh使用python实现简单的位移替换加密,制作密码机关真是太好玩了哈哈哈!eainrhg rIOSRHQLYTIWEFIUQWGDIWQ"
key
=
input
(
"私钥"
)
# 要加密语句
message
=
"诺依,周末一起去看动漫展吧!"
message
=
input
(
"密语:"
)
# 最终加密后的语句
key_message
=
""
...
...
@@ -14,10 +14,13 @@ for i in message:
key_message
=
key_message
+
text
print
(
key_message
)
#
noice
=
"wieruhnfbteihfneorihgisfvbkagdhyfr98426735ac/Csfb"
#二次加密
noice
=
"wieruhnfbteihfneorihgisfvbkagdhyfr98426735ac/Csfb四u大哥v微软YF和SDF和WOFJHFDNVFDKLVNSK"
list_mes
=
list
(
key_message
)
index
=
random
.
randint
(
0
,
len
(
key_message
))
list_mes
.
insert
(
index
,
noice
)
res_mes
=
""
.
join
(
list_mes
)
print
(
res_mes
)
...
...
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