题解列表

筛选

1106: 奖学金 (二维数组)

摘要:解题思路:将所有信息存放至二维数组并依据总分,语文成绩降序排序,依据学号升序排序注意事项:参考代码:def scholarship_ranking():    # 读取学生数量    n = int(……

使用递归完成解题,代码清晰可读

摘要:解题思路:使用函数递归,返回两个数值,分别是空水瓶数和已购水瓶数,当空水瓶数=2时,返回值加1(如题所述),<2时,直接返回代码结构如下:注意事项:在编写代码途中,需要注意适当增加变量保存水瓶数,如变……

自定义函数之字符提取

摘要:解题思路:注意事项:参考代码:def yuan(a,b):    for i in a:        if i==&#39;a&#39; or i==&#39;e&#39; or i==&#39;i……

不懂可评论

摘要:解题思路:注意事项:参考代码:num=int(input()) print("%c"%chr(num))……

不懂可评论

摘要:解题思路:注意事项:参考代码:char=input() print("%d"%ord(char))……

不懂可评论

摘要:解题思路:注意事项:参考代码:hua=float(input()) she=5/9*(hua-32) print("%.2f"%she)……

不懂可评论

摘要:解题思路:注意事项:参考代码:num=int(input()) num=bool(num) num=int(num) print(num)……

不懂可评论

摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split()) a,b=b,a print(a,b)……

不懂可评论

摘要:解题思路:注意事项:参考代码:h=(150/15)*2 t=(15+25)*h/2 print("%.2f"%t)……