02 2024 档案
摘要:a=input("Please input a number:")def test(num): try: return float(a) except ValueError: return "请输入数字"print(test(a))
阅读全文
摘要:s="I am welcome you!"num=0for i in s: if i=='m': num+=1print(num)
阅读全文
摘要:s="I am welcome you!"world="welcome"def function(): if world in s: return s.find(world) else: return -1print(function())
阅读全文
摘要:x=input("please input a number:")if x==x[::-1]: print("是回文")else: print("不是回文")
阅读全文