Commit 04447d33 by BellCodeEditor

save project

parent 5d4d1144
Showing with 23 additions and 19 deletions
dict={'方便面':5,'辣条':2,'果冻':19,'黄焖鸡米饭':120} import random
h=input("你想要什么") key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
if h in dict: message = input("请输入")
print('你想要的东西要'+str(dict[h])+'元') key_message = ""
else: noise="ghgfdgfdfdf"
print('sorry,we not have') for i in message:
\ No newline at end of file str1 = i
str2 = random.choice(key)
str3 = random.choice(key)
text = str1+str2+str3
key_message = key_message + text
list1=list(key_message)
index=random.randint(0,len(key_message))
list1.insert(index,noise)
re="".join(list1)
print(re)
\ No newline at end of file
dict_list={"继国缘一":"无限","岩柱":50}
dict_list["炭治郎"]="主角"
dict_list["岩柱"]="悲鸣与行冥"
dict_list["继国缘一"]
print(dict_list)
\ No newline at end of file
dict_hero={'猴子':10,'猴一':21,'猴二':21,'猴五':22,'猴队长':29,'猴七':30,}
dict_hero['猴七']
dict_hero['猴七']=10
print(dict_hero)
\ No newline at end of file
# 直接运行以下代码,说说你的发现:
list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98}
print(len(list_hero))
print(len(dict_hero))
\ 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