摘要: x=input("3014号请输入一个字符串:")for i in x: if ord('a')<ord(i) and ord(i)<ord('z'): print(chr(ord('z')-(ord(i)-ord('a'))),end='') elif ord('A')<ord(i) and or 阅读全文
posted @ 2021-09-14 22:26 烎胤 阅读(78) 评论(0) 推荐(0)
摘要: s = input()left = 0for i in s: if i =='(': left = + 1 if i ==')': left = - 1 if left < 0: print("配对不成功") breakelse: if left == 0: print("配对成功") else: 阅读全文
posted @ 2021-09-14 21:08 烎胤 阅读(30) 评论(0) 推荐(0)
摘要: 实例三: money_all = 56.75 + 72.91 + 88.50 + 26.37 + 68.51money_all_str = str(money_all)print("商品总金额为:"+money_all_str)money_real = int(money_all)money_rea 阅读全文
posted @ 2021-09-14 20:34 烎胤 阅读(48) 评论(0) 推荐(0)