03 2020 档案
C语言嵌套循环之输出九九乘法表
摘要://输出九九乘法表 #include <stdio.h> int main() { int m,n; for(m=1;m<=9;m++) { n=1; for(n=1;n<=9;n++) { printf("%4d",m*n); } printf("\n"); } return 0; } //输出下 阅读全文
posted @ 2020-03-31 13:47 BillGates-- 阅读(4154) 评论(0) 推荐(0)
python遍历集合的两种方式
摘要:## 用for循环遍历A = {'1','2','star'} for item in A: print(item,end='') ## 用while循环遍历A = {'1','2','star'} try: while True: print(A.pop(),end='') except: pas 阅读全文
posted @ 2020-03-30 22:45 BillGates-- 阅读(8590) 评论(0) 推荐(0)
python123作业--字符串分段组合
摘要:描述 获得输入的一个字符串s,以字符减号(-)分割s,将其中首尾两段用加号(+)组合后输出。 输入输出示例 输入 输出 示例 1 Alice-Bob-Charis-David-Eric-Flurry Alice+Flurry s = input() ls = s.split("-") print(" 阅读全文
posted @ 2020-03-23 20:50 BillGates-- 阅读(5905) 评论(0) 推荐(0)
python123作业--求100以内的素数之和
摘要:描述 求100以内所有素数之和并输出。 ‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‭‬ 素数指从大于1,且仅能被1和自己整除的整数。‪‬‪‬‪‬‪‬‪‬‮ 阅读全文
posted @ 2020-03-23 20:45 BillGates-- 阅读(1673) 评论(0) 推荐(0)