Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_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
b97d5e82
authored
Oct 26, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
024fb164
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
1.py
123.py
1.py
0 → 100644
View file @
b97d5e82
message
=
input
(
"你要加密什么密语?"
)
key
=
"!@#$
%
^&*(*&^
%
$#@#$
%
)(*&^
%
$#)"
import
random
str5
=
""
for
i
in
message
:
str1
=
i
str2
=
random
.
choice
(
key
)
str3
=
random
.
choice
(
key
)
str4
=
str1
+
str2
+
str3
str5
=
str5
+
str4
print
(
str5
)
noise
=
"!@#$
%%
$
%
^*&~~"
list1
=
list
(
str5
)
index
=
random
.
randint
(
0
,
len
(
list1
))
list1
.
insert
(
index
,
noise
)
str6
=
""
.
join
(
list1
)
print
(
str6
)
123.py
0 → 100644
View file @
b97d5e82
def
new_input
():
list1
=
[]
while
True
:
data
=
input
(
"请输入一个数字:"
)
if
data
==
"stop"
:
break
else
:
try
:
data_1
=
int
(
data
)
except
:
print
(
"格式错误,请输入数字!"
)
else
:
list1
.
append
(
data_1
)
print
(
list1
)
new_input
()
\ 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