摘要: a ='qwerty' a=a.replace('w','*')replace——实现了w和*的转换 print(a)打印出来的是这个'q*erty' 阅读全文
posted @ 2021-03-02 19:37 火烧火燎 阅读(37) 评论(0) 推荐(0)
摘要: 1 sw=int(input('suiweishuo:')) 2 gw = sw%10个位数 3 sw =sw%100//10十位数 4 bw =sw//100%10百位数 5 qw =sw//1000千位数 6 print()四位数相加 ,怎样让四位数相加自己想办法 阅读全文
posted @ 2021-03-02 16:34 火烧火燎 阅读(366) 评论(0) 推荐(0)
摘要: xm=input("xm:") nl=input("nl:") xb=input("xb:") sg=input("sg:") grxx=f''' ~~~~~~我的个人信息~~~~~~ 姓名 :{xm} 年龄 :{nl} 性别 :{xb} 身高 :{sg} ~~~~~~结束~~~~~~ ''' pr 阅读全文
posted @ 2021-03-02 12:19 火烧火燎 阅读(217) 评论(0) 推荐(0)
摘要: cs = 0 while cs <=10: cs += 1 print(f"{cs}") 阅读全文
posted @ 2021-03-02 12:18 火烧火燎 阅读(40) 评论(0) 推荐(0)
摘要: for i in range(9): print(i) #exit 结束程序 阅读全文
posted @ 2021-03-02 12:16 火烧火燎 阅读(26) 评论(0) 推荐(0)
摘要: 这里是随机猜大小 import random sz=random.randint(1 ,100) for i in range(5): sr=int(input("shu_ru:")) if sz< sr: print("大了") elif sz>sr: print("小了") else: exit 阅读全文
posted @ 2021-03-02 12:14 火烧火燎 阅读(62) 评论(0) 推荐(0)
摘要: for i in range (10): if i<= 5: print(i * "*") else: print((10-i) * "*") 阅读全文
posted @ 2021-03-02 12:13 火烧火燎 阅读(26) 评论(0) 推荐(0)
摘要: for i in range(1,19): print(f" {i}层 ") if i==4: continue for j in range(1,7): if i==5 and j==5: print("beibei") break print(f"l{i}--{i}--{j}室") View C 阅读全文
posted @ 2021-03-02 12:12 火烧火燎 阅读(17) 评论(0) 推荐(0)