自定义函数之数字后移 摘要:解题思路:注意事项:参考代码:def houyi(my_list,m,n): list1=[]+my_list for i in range(n): list1[i] = m…… 题解列表 2024年06月05日 0 点赞 0 评论 247 浏览 评分:0.0
自定义函数之字符类型统计 摘要:解题思路:注意事项:参考代码:def tongji(m): a,b,c,d = 0,0,0,0 for i in m: if i.isalpha(): …… 题解列表 2024年06月04日 0 点赞 0 评论 307 浏览 评分:0.0
自定义函数之数字分离 摘要:解题思路:注意事项:参考代码:def fenli(a): for i in a: print(i,end=' ')a = input()fenli(a)…… 题解列表 2024年06月03日 0 点赞 0 评论 388 浏览 评分:0.0
自定义函数之字符提取 摘要:解题思路:注意事项:参考代码:def tiqu(a): for i in a: if i in b: print(i,end='')a = i…… 题解列表 2024年06月03日 0 点赞 0 评论 222 浏览 评分:0.0
自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:def lmjp(a,b): print(a+b)a = input()b = input()lmjp(a,b)…… 题解列表 2024年06月03日 0 点赞 0 评论 276 浏览 评分:0.0
自定义函数之字符串反转 摘要:解题思路:注意事项:参考代码:def dcvi(m): for i in range(len(m)): print(m[len(m)-1-i],end='')m=i…… 题解列表 2024年06月03日 0 点赞 0 评论 326 浏览 评分:9.9
[编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:def my_test(m): for i in range(2,m): if m%i==0: n = 1 …… 题解列表 2024年06月03日 0 点赞 0 评论 323 浏览 评分:9.9
简单易懂,看懂给个好评! 摘要:解题思路:注意事项:参考代码:n = int(input())s = 0result = 1for i in range(n): result *= (i+1) s += resultpr…… 题解列表 2024年06月03日 0 点赞 0 评论 510 浏览 评分:9.9
用函数写的 摘要:解题思路:注意事项:参考代码:def get_sum(a=4,b=3): a,b =map(int,input().split()) sum = a%b print(sum)get_…… 题解列表 2024年06月02日 0 点赞 0 评论 472 浏览 评分:9.9
递归法(辗转相除法)求最大公约数 摘要:解题思路:用辗转相除法求最大公约数,在借助最大公约数求最小公倍数注意事项:参考代码:def yue(m,n): if n==0:return m else:return yue(n,m%n…… 题解列表 2024年06月01日 0 点赞 0 评论 416 浏览 评分:9.9