02 2024 档案

摘要:a=input("Please input a number:")def test(num): try: return float(a) except ValueError: return "请输入数字"print(test(a)) 阅读全文
posted @ 2024-02-07 14:58 飞虎就是我 阅读(22) 评论(0) 推荐(0) 编辑
摘要:s="I am welcome you!"num=0for i in s: if i=='m': num+=1print(num) 阅读全文
posted @ 2024-02-07 13:51 飞虎就是我 阅读(9) 评论(0) 推荐(0) 编辑
摘要:s="I am welcome you!"world="welcome"def function(): if world in s: return s.find(world) else: return -1print(function()) 阅读全文
posted @ 2024-02-07 11:39 飞虎就是我 阅读(11) 评论(0) 推荐(0) 编辑
摘要:x=input("please input a number:")if x==x[::-1]: print("是回文")else: print("不是回文") 阅读全文
posted @ 2024-02-07 11:26 飞虎就是我 阅读(21) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示