Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson7_6
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
3d5f6502
authored
Nov 28, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
028c7040
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletions
123.py
diy4.py
练习1-代码 - 副本.py
123.py
0 → 100644
View file @
3d5f6502
n
=
int
(
input
(
"输入:"
))
numlist
=
[]
for
i
in
range
(
1
,
n
+
1
):
num
=
str
(
i
)
+
":"
+
str
(
i
**
2
)
numlist
.
append
(
num
)
number
=
','
.
join
(
numlist
)
print
(
number
)
diy4.py
View file @
3d5f6502
import
random
noise
=
'ydewdg'
key
=
"abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
message
=
"诺依,周末一起去看动漫展吧!"
message
=
'诺依,明天一起去看动漫展吧!'
text
=
''
for
i
in
message
:
str1
=
i
...
...
练习1-代码 - 副本.py
0 → 100644
View file @
3d5f6502
message
=
"一作c幕!玩幕哈简都制了是b替高y!光码g时h了port:@#$
%
^&刻现简,g密中哈的国替玩奥作哈运移机健好玩儿!太加好加油换b!实b"
message
=
"一作c幕!玩幕哈简都制了是b替高y!光码g时h了port:@#$
%
^&刻现简,g密中哈的国替玩奥作哈运移机健好玩儿!太加好加油换b!实b"
# 原句子加密过程:
# ① .原句子使用私钥加密:
# "abcdefgh使用python实现简单的位移替换加密,制作密码机关真是太好玩了哈哈哈!"
# ② .原句子每个字符之间插入两个随机的私钥字符
# ③ .使用私钥加密完后使用 "port:@#$%^&" 二次加密,随机插入到句子中
a
=
message
.
split
(
"port:@#$
%
^&"
)
b
=
a
[
0
]
+
a
[
1
]
c
=
[]
print
(
b
)
for
x
in
range
(
0
,
len
(
b
)
-
1
,
3
):
print
(
b
[
x
])
c
.
append
(
b
[
x
])
c
=
''
.
join
(
c
)
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