Commit e4652f69 by BellCodeEditor

auto save

parent 09875a4c
Showing with 40 additions and 17 deletions
import random
a="国庆补课"
b="dhaailh附件;oak;ods哦阿婆上课"
c="#%#^#$^"
d=""
for i in a:
b1=random.choice(b)
b2=random.choice(b)
x=i+b1+b2
d=d+x
d=list(d)
for i in range(6):
e=random.randint(1,11)
f=random.choice(c)
d.insert(e,f)
print(e)
print(d)
# 假期到了,诺依想出去玩,但不知道有没有飞机直达那里,
# 悟空做了个小程序帮助诺依,然而代码出现了3处错误。
# 请你找出来,并运行~
city = ['纽约','华盛顿','桃源岛','洛杉矶','芝加哥',"旧金山"]
a=input('你想去哪里啊?')
if a in city:
print('可以乘坐飞机通往'+a)
else:
print('没有'+a+'这座城市')
\ No newline at end of file
11
9
5
9
2
5
['国', 'i', '$', 'a', '庆', '#', '上', '^', 'a', '补', 'd', '#', 'h', '#', '课', 'a', '#', 'd']
\ No newline at end of file
a=['国', 'i', '$', 'a', '庆', '#', '上', '^', 'a', '补', 'd', '#', 'h', '#', '课', 'a', '#', 'd']
a.pop(5)
a.pop(2)
a.pop(9)
a.pop(5)
a.pop(9)
a.pop(11)
b=""
for i in range(len(a)):
if i%3==0:
b=b+a[i]
print(b)
# 下面的这段代码一共有5处错误,每一行都有一种典型的语法错误,请修改~
for i in range(1,8):
print('克洛诺斯将第' + str(i) + '个孩子吞进肚子里')
if i == 5:
break
print('第6个孩子宙斯逃过一劫。')
\ 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