Cheno>_<o
Cheno>_<o
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Cheno>_<o的博客
全部文章
/ 题解
(共42篇)
题解 | #拯救被污染的字符串#
my_str = 'I am$ N$iuniu$, an$d I $am stu$dying in $Now$coder!' my_list = my_str.split('$') print(my_list) str = ''.join(my_list) print(str)
Python3
2022-06-22
0
372
题解 | #梦想的大学#
# 创建一个名为survey_dict的空字典 survey_dict = {} while 1: print('If you have the chance, which university do you want to go to most?') print('What is ...
Python3
2022-06-22
0
415
题解 | #披萨店的订单#
# 创建列表 pizza_orders pizza_orders = ['chichen','bacon', 'durian'] # 创建空列表 finished_pizza finished_pizza = [] while (len(pizza_orders)!=0): pizza ...
Python3
2022-06-22
0
247
题解 | #游乐园的门票#
while 1: print("Please tell me your height!\nEnter 'quit' to end the program.") try: str = input() if str == 'quit': ...
Python3
2022-06-22
0
206
题解 | #被8整除的数字#
active = True while(active): print("Please enter a positive integer!\nEnter 'quit' to end the program.") try: resp = input() i...
Python3
2022-06-22
1
274
题解 | #取号#
while(1): print("Welcome! How many people, please?\nEnter 'quit' to end the program.") resp = input() if resp == 'quit': break ...
Python3
2022-06-22
0
270
题解 | #自动售卖饮料机#
# 使用print()语句一行输出字符串 'What kind of drink would you like?' print('What kind of drink would you like?') # 使用input()函数读取字符串,并将读取到的字符串存储到变量kind_of_drink...
Python3
2022-06-22
0
232
题解 | #牛牛的朋友#
# 创建列表 friends_list friends_list = ['Niu Ke Le', 'Niumei', 'Niuneng', 'GOLO'] # 请写一个replace函数,第一个参数是列表friends_list,第二个参数是要替换的数字index,即在函数中将列表元素修改成成列表...
Python3
2022-06-22
0
260
题解 | #函数求差#
def cal(a,b): return a-b x = int(input()) y = int(input()) print(cal(x,y)) print(cal(y,x))
Python3
2022-06-22
0
237
题解 | #首都#
# 创建字典cities_dict cities_dict = {'Beijing':{'Capital': 'China'}, 'Moscow':{'Capital': 'Russia'}, 'Paris':{'Capital': 'France'}} # 使用for循环遍历"已使用sorted...
Python3
2022-06-22
0
227
首页
上一页
1
2
3
4
5
下一页
末页