题解列表

筛选

[递归]阶乘求和

摘要:解题思路:递归注意事项:参考代码:def fact(n):     if n == 0 or n == 1:         return 1     else:        

报数问题的思路与代码

摘要:解题思路:使列表形成一个循环,每次报到3(列表的第2位)进行删除注意事项:参考代码:n=int(input())x=[i for i in range(1,n+1)]while n>2:    for……

[编程入门]结构体之成绩记录

摘要:解题思路:注意事项:参考代码:class Student():     def input(self, student_id, name, score):         self.student……

矩阵交换行

摘要:解题思路:注意事项:参考代码:for i in range(5):    ls = list(map(int, input().split()))    a.append(ls)b = list(ma……

石头剪子布

摘要:解题思路:注意事项:参考代码:n = int(input())for i in range(n):    c = list(map(str,input().split()))    if c[0]==……

统计数字字符个数

摘要:解题思路:注意事项:参考代码:n = input()c = 0b="".join(n)for i in b:    if i.isdigit():        c=c+1print(c)……

计算书费写法

摘要:解题思路:注意事项:参考代码:ls1 = list(map(int,input().split()))ls2 = [28.9,32.7,45.6,78,35,86.2,27.8,43,56,65]su……

财务管理求月平均值

摘要:解题思路:注意事项:参考代码:sum=0for i in range(12):    a=float(input())    sum+=aprint('${:.2f}'.format(……