1063: 二级C语言-统计字符-题解(python代码) 摘要:解题思路:注意事项:参考代码:a = input()b,c,d,e = 0,0,0,0for i in a: if i.isalpha(): b += 1 elif i.is…… 题解列表 2021年10月14日 0 点赞 0 评论 284 浏览 评分:0.0
1033: [编程入门]自定义函数之字符提取-题解(python代码) 摘要:解题思路:注意事项:参考代码:a = input()for i in a: if i in 'aeiou': print(i,end='')…… 题解列表 2021年10月14日 0 点赞 0 评论 178 浏览 评分:0.0
1039: [编程入门]宏定义之闰年判断-题解(python代码) 摘要:解题思路:注意事项:参考代码:a = int(input())if a%400 == 0 or (a%4 == 0 and a%100 != 0): print('L')else…… 题解列表 2021年10月14日 0 点赞 0 评论 309 浏览 评分:0.0
1034: [编程入门]自定义函数之数字分离-题解(python代码) 摘要:解题思路:迭代字符串注意事项:print()输出会自动换行参考代码:a = input()for i in a: print(i,end=' ')…… 题解列表 2021年10月14日 0 点赞 0 评论 501 浏览 评分:6.0
1038: [编程入门]宏定义练习之三角形面积-题解(python代码) 摘要:解题思路:注意事项:参考代码:import matha,b,c = map(float,input().split())s = (a+b+c)/2m = math.sqrt((s*(s-a)*(s-b…… 题解列表 2021年10月14日 0 点赞 0 评论 296 浏览 评分:7.3
1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:a = int(input())for i in range(2,a//2+1): if a % i == 0: print("not prime")…… 题解列表 2021年10月14日 0 点赞 0 评论 353 浏览 评分:0.0
1036: [编程入门]带参数宏定义练习-题解(python代码) 摘要:解题思路:注意事项:参考代码:a,b = map(int,input().split())a,b = b,aprint("{} {}".format(a,b))…… 题解列表 2021年10月14日 0 点赞 0 评论 296 浏览 评分:6.0
1041: [编程入门]宏定义之找最大数-题解(python代码) 摘要:解题思路:注意事项:参考代码:a,b,c = map(int,input().split())d = max(a,b,c)print("{:.3f}".format(d))print("{:.3f}"…… 题解列表 2021年10月14日 0 点赞 0 评论 285 浏览 评分:0.0
[编程入门]字符串分类统计,正则4行代码解题思路 摘要:解题思路:利用正则进行匹配注意事项:其他符号由于不好匹配,可采用整个字符串长度减去已知进行求算参考代码:import re strings = input() m, n, p = (len(re.…… 题解列表 2021年10月13日 0 点赞 0 评论 691 浏览 评分:6.0
简单代码易理解 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ char a; int b; float c; double d; scanf("%c %d %f %lf",…… 题解列表 2021年10月13日 0 点赞 0 评论 183 浏览 评分:0.0