摘要:
import hm_01_测试模块1 import hm_02_测试模块2 hm_01_测试模块1.say_hello() dog = hm_01_测试模块1.Dog() print(dog) hm_02_测试模块2.say_hello() cat = hm_02_测试模块2.Cat() print 阅读全文
摘要:
def demo1(): return int(input("请输入一个整数")) def demo2(): return demo1() # 利用异常的传递性 ,在主程序捕获异常 try: print(demo2()) except Exception as result: print("未知错误 阅读全文