# -*-coding:utf-8 -*- # @Time : 20:59 # @Author: Huang Rongjin # @File : 43.Bug Common types of .py #
@Software: PyCharm '''try except''' try: a=int (input(' Please enter an integer :')) b=int
(input(' Please enter two integers :')) result=a/b print(' The result is :',result) except : print(' Divisor not allowed 0')
print(' Program end ') '''try except else''' # If try The block has no exception , Then execute else block , If try Exception in , Then execute except
try: a=int (input(' Please enter an integer :')) b=int (input(' Please enter two integers :')) result=a/b
print(' The result is :',result) except Exception as e: print(' Error ',e) else: print(result)
'''try except else finally''' #finally The block is executed whether or not an exception occurs , Can be commonly released try block
'''traceback Use of modules ''' import traceback try: print('------------') print(1/0)
except: traceback.print_exc()

Technology
©2019-2020 Toolsou All rights reserved,
【C++ Must see for entry 】C++ from 0 reach 1 Introductory programming axios Interceptor packaging and use Spring Boot Interview must ask : Automatic configuration principle VMware 16 install centos 7 Detailed tutorial C Language data structure - Sequence table delete duplicates V2.0.0 The 12th Blue Bridge Cup c++b Group personal problem solving On sending data from serial port single chip microcomputer to upper computer centos7 install RabbitMqjava Polymorphic array of opencv-python Fourier transform and inverse transform