Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson7_2

  • This project
    • Loading...
  • Sign in
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 d10cfb4e authored 2 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 471b8360
Show whitespace changes
Inline Side-by-side
Showing with 11 additions and 8 deletions
  • .vscode/0.py
  • diy2.py
.vscode/0.py
View file @ d10cfb4e
import random list = ['a','b','c','d']
key = '信息加密好酷呀!' s = ''.join(list)
str = random.choice(key) print(s)
print(str) \ No newline at end of file
\ No newline at end of file
This diff is collapsed. Click to expand it.
diy2.py
View file @ d10cfb4e
...@@ -3,11 +3,15 @@ key = 'qwerty去啊自我实现二的,吃软饭v提供必要黑奴加密!' ...@@ -3,11 +3,15 @@ key = 'qwerty去啊自我实现二的,吃软饭v提供必要黑奴加密!'
key_message = '' key_message = ''
# 请对message进行遍历,取出所有元素 # 请对message进行遍历,取出所有元素
import random import random
noise = 'port:@#$%^&'
for i in message: for i in message:
str1 = i str1 = i
str2 = random.choice(key) str2 = random.choice(key)
str3 = random.choice(key) str3 = random.choice(key)
t = str1+str2+str3 t = str1+str2+str3
key_message += t key_message += t
print(key_message)
\ No newline at end of file list_message = list(key_message)
list_message.insert(5,noise)
m_message = ''.join(list_message)
print(m_message)
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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