Commit b7e381c6 by BellCodeEditor

auto save

parent 28feec47
import random
key="abcdefg使用编程器实现移位加密,制作密码机关真的太好玩了哈哈哈!"
message = "诺依,周末一起去看动漫展吧!" message = "诺依,周末一起去看动漫展吧!"
k='mjknjnm'
tent=""
for i in message:
str1=i
str2=random.choice(key)
str3=random.choice(key)
tent=tent+str1+str2+str3
key_message=tent
j=list(key_message)
j.insert(random.randint(1,15),k)d
key_message="".join(j)
print(key_message)
# 请使用索引的知识,取出message所有元素(不用遍历的方式)
print(message[0:1])
\ No newline at end of file
import random
s=0
n=0
m=0
for i in range(3000):
x=random.randint(8,10)
if x==8:
s+=1
if x==9:
n+=1
if x==10:
m+=1
print(s,n,m)
\ No newline at end of file
str1 = "本节课我们学习文字加密"
str2 = "用 python 进行"
str3 = str1[7:11]
a=list(str1)
a.insert(7,str2)
str4="".join(a)
print(str4)
str1 = "bellcode"
print(str1[4:9])
text = "hello world!"
for i in text:
print(i)
\ No newline at end of file
text = ["p", "y", "t", "h", "o", "n"]
text="".join(text)
print(text)
\ No newline at end of file
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