牛客422438404号
牛客422438404号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客422438404号的博客
全部文章
(共6篇)
题解 | #拯救被污染的字符串#
my_str='I am$ N$iuniu$, an$d I $am stu$dying in $Now$coder!' #使用split函数将这份字符串从符号$处分割成众多字符列表,记录在my_list中 my_lis...
Python3
2022-07-15
0
214
题解 | #售罄的培根披萨#
#题目出错 #输出应该是 #print('A pastrami order was deleted from list.') #print('There is really no pastrami in sandwich_orders!') pizza_inventory=['bacon','dur...
Python3
2022-07-15
1
304
题解 | #毕业生就业调查#
step1:创建列表和字典 step2:for遍历列表 step3:if语句遍历字典并输出满足的 survey_list=['Niumei','Niu Ke Le','GURR','LOLO'] result_dict={'Niumei': 'Nowcode...
Python3
2022-07-14
0
284
题解 | #遍历字典#
#step1:创建字典 #step2:sorted()函数排序 #step3:添加新元素 #step4:通过键遍历字典 operators_dict={'<': 'less than','==': 'equal'} print('Here&n...
Python3
2022-07-14
2
343
题解 | #食堂点餐#
#step1:创建列表order_list #step2:for遍历列表,使用if找到适合的列表元素将其输出 #step3:每遍历一个列表元素,不同种类的price加对应的单价 #step4:直接递加不同种类的价格 order_list=['rice', 'beef', 'ch...
Python3
2022-07-11
0
290
题解 | #食堂点餐#
#step1:创建列表order_list #step2:for遍历列表,使用if找到适合的列表元素将其输出 #step3:每遍历一个列表元素,不同种类的count计数加1 #step4:根据计数得到的,分别乘以单价,求出总和 order_list=['rice', 'beef', 'chips',...
Python3
2022-07-11
1
444