Movatterモバイル変換


[0]ホーム

URL:


PDF, PPTX1,396 views

Python programming : Exceptions

The document discusses different types of errors in programming:1. Compile-time errors occur due to syntax errors in the code and prevent the program from compiling. Examples include missing colons or incorrect indentation. 2. Runtime errors occur when the Python virtual machine (PVM) cannot execute the bytecode. Examples include type errors during operations or accessing elements beyond the bounds of a list.3. Logical errors stem from flaws in the program's logic, like using an incorrect formula. Exception handling allows programmers to anticipate and handle errors gracefully. The try/except blocks allow specific code to handle exceptions of a given type. Finally blocks ensure code is executed after the try/except blocks complete.

Embed presentation

Download as PDF, PPTX
ExceptionsTeam Emertxe
Introduction
ErrorsCategories of ErrorsCompile-timeRuntimeLogical
ErrorsCompile-TimeWhat? These are syntactical errors found in the code, due to which programfails to compileExample Missing a colon in the statements llike if, while, for, def etcProgram Outputx = 1if x == 1print("Colon missing")py 1.0_compile_time_error.pyFile "1.0_compile_time_error.py", line 5if x == 1^SyntaxError: invalid syntaxx = 1#Indentation Errorif x == 1:print("Hai")print("Hello")py 1.1_compile_time_error.pyFile "1.1_compile_time_error.py", line 8print("Hello")^IndentationError: unexpected indent
ErrorsRuntime - 1What? When PVM cannot execute the byte code, it flags runtime errorExample Insufficient memory to store something or inability of the PVM toexecute some statement come under runtime errorsProgram Outputdef combine(a, b):print(a + b)#Call the combine functioncombine("Hai", 25)py 2.0_runtime_errors.pyTraceback (most recent call last):File "2.0_runtime_errors.py", line 7, in <module>combine("Hai", 25)File "2.0_runtime_errors.py", line 4, in combineprint(a + b)TypeError: can only concatenate str (not "int") to str"""Conclusion:1. Compiler will not check the datatypes.2.Type checking is done by PVM during run-time."""
ErrorsRuntime - 2What? When PVM cannot execute the byte code, it flags runtime errorExample Insufficient memory to store something or inability of the PVM toexecute some statement come under runtime errorsProgram Output#Accessing the item beyond the arrayboundslst = ["A", "B", "C"]print(lst[3])py 2.1_runtime_errors.pyTraceback (most recent call last):File "2.1_runtime_errors.py", line 5, in <module>print(lst[3])IndexError: list index out of range
ErrorsLogical-1What? These errors depicts flaws in the logic of the programExample Usage of wrong formulasProgram Outputdef increment(sal):sal = sal * 15 / 100return sal#Call the increment()sal = increment(5000.00)print("New Salary: %.2f" % sal)py 3.0_logical_errors.pyNew Salary: 750.00
ErrorsLogical-2What? These errors depicts flaws in the logic of the programExample Usage of wrong formulasProgram Output#1. Open the filef = open("myfile", "w")#Accept a, b, store the result of a/b into the filea, b = [int(x) for x in input("Enter two number: ").split()]c = a / b#Write the result into the filef.write("Writing %d into myfile" % c)#Close the filef.close()print("File closed")py 4_effect_of_exception.pyEnter two number: 10 0Traceback (most recent call last):File "4_effect_of_exception.py", line 8, in<module>c = a / bZeroDivisionError: division by zero
ErrorsCommonWhen there is an error in a program, due to its sudden termination, the following thingscan be suspectedThe important data in the files or databases used in the program may be lostThe software may be corruptedThe program abruptly terminates giving error message to the user making the userlosing trust in the software
ExceptionsIntroductionAn exception is a runtime error which can be handled by the programmerThe programmer can guess an error and he can do something to eliminate the harm caused bythat error called an ‘Exception’BaseExceptionExceptionStandardError WarningArthmeticErrorAssertionErrorSyntaxErrorTypeErrorEOFErrorRuntimeErrorImportErrorNameErrorDeprecationWarningRuntimeWarningImportantWarning
ExceptionsException HandlingThe purpose of handling errors is to make program robustStep-1 try:statements#To handle the ZeroDivisionError Exceptiontry:f = open("myfile", "w")a, b = [int(x) for x in input("Enter two numbers: ").split()]c = a / bf.write("Writing %d into myfile" % c)Step-2 except exeptionname:statementsexcept ZeroDivisionError:print("Divide by Zero Error")print("Don't enter zero as input")Step-3 finally:statementsfinally:f.close()print("Myfile closed")
ExceptionsProgram#To handle the ZeroDivisionError Exception#An Exception handling Exampletry:f = open("myfile", "w")a, b = [int(x) for x in input("Enter two numbers: ").split()]c = a / bf.write("Writing %d into myfile" % c)except ZeroDivisionError:print("Divide by Zero Error")print("Don't enter zero as input")finally:f.close()print("Myfile closed")Output:py 5_exception_handling.pyEnter two numbers: 10 0Divide by Zero ErrorDon't enter zero as inputMyfile closed
ExceptionsException Handling Syntaxtry:statementsexcept Exception1:handler1except Exception2:handler2else:statementsfinally:statements
ExceptionsException Handling: Noteworthy- A single try block can contain several except blocks.- Multiple except blocks can be used to handle multiple exceptions.- We cannot have except block without the try block.- We can write try block without any except block.- Else and finally are not compulsory.- When there is no exception, else block is executed after the try block.- Finally block is always executed.
ExceptionsTypes: Program-1#To handle the syntax error given by eval() function#Example for Synatx errortry:date = eval(input("Enter the date: "))except SyntaxError:print("Invalid Date")else:print("You entered: ", date)Output:Run-1:Enter the date: 5, 12, 2018You entered: (5, 12, 2018)Run-2:Enter the date: 5d, 12m, 2018yInvalid Date
ExceptionsTypes: Program-2#To handle the IOError by open() function#Example for IOErrortry:name = input("Enter the filename: ")f = open(name, "r")except IOError:print("File not found: ", name)else:n = len(f.readlines())print(name, "has", n, "Lines")f.close()If the entered file is not exists, it will raise an IOError
ExceptionsTypes: Program-3#Example for two exceptions#A function to find the total and average of list elementsdef avg(list):tot = 0for x in list:tot += xavg = tot / len(list)return tot.avg#Call avg() and pass the listtry:t, a = avg([1, 2, 3, 4, 5, 'a'])#t, a = avg([]) #Will give ZeroDivisionErrorprint("Total = {}, Average = {}". format(t, a))except TypeError:print("Type Error: Pls provide the numbers")except ZeroDivisionError:print("ZeroDivisionError, Pls do not give empty list")Output:Run-1:Type Error: Pls provide the numbersRun-2:ZeroDivisionError, Pls do not give empty list
ExceptionsExcept Block: Various formatsFormat-1 except Exceptionclass:Format-2 except Exceptionclass as obj:Format-3 except (Exceptionclass1, Exceptionclass2, ...):Format-4 except:
ExceptionsTypes: Program-3A#Example for two exceptions#A function to find the total and average of list elementsdef avg(list):tot = 0for x in list:tot += xavg = tot / len(list)return tot.avg#Call avg() and pass the listtry:t, a = avg([1, 2, 3, 4, 5, 'a'])#t, a = avg([]) #Will give ZeroDivisionErrorprint("Total = {}, Average = {}". format(t, a))except (TypeError, ZeroDivisionError):print("Type Error / ZeroDivisionError”)Output:Run-1:Type Error / ZeroDivisionErrorRun-2:Type Error / ZeroDivisionError
ExceptionsThe assert StatementIt is useful to ensure that a given condition is True, It is not True, it raisesAssertionError.Syntax:assert condition, message
ExceptionsThe assert Statement: ProgramsProgram - 1 Program - 2#Handling AssertionErrortry:x = int(input("Enter the number between 5 and 10: "))assert x >= 5 and x <= 10print("The number entered: ", x)except AssertionError:print("The condition is not fulfilled")#Handling AssertionErrortry:x = int(input("Enter the number between 5 and 10: "))assert x >= 5 and x <= 10, "Your input is INVALID"print("The number entered: ", x)except AssertionError as Obj:print(Obj)
ExceptionsUser-Defined ExceptionsStep-1 class MyException(Exception):def __init__(self, arg):self.msg = argStep-2 raise MyException("Message")Step-3 try:#codeexcept MyException as me:print(me)
ExceptionsUser-Defined Exceptions: Program#To create our own exceptions and raise it when neededclass MyException(Exception):def __init__(self, arg):self.msg = argdef check(dict):for k, v in dict.items():print("Name = {:15s} Balance = {:10.2f}" . format(k, v)) if (v < 2000.00):raise MyException("Less Bal Amount" + k)bank = {"Raj": 5000.00, "Vani": 8900.50, "Ajay": 1990.00}try:check(bank)except MyException as me:print(me)
THANK YOU

Recommended

PDF
Exception Handling In Python | Exceptions In Python | Python Programming Tuto...
PPTX
Python Exception Handling
PDF
Introduction to python programming
PPTX
Python-FileHandling.pptx
PPTX
Python Functions
PDF
Python programming : Strings
PPTX
Python basics
PPTX
Python ppt
PDF
Python exception handling
PDF
Python Flow Control
PDF
Object oriented programming c++
PPTX
File handling in Python
PDF
Python Basics
PDF
Strings in Python
PDF
Python functions
PPTX
Static Data Members and Member Functions
PDF
Python libraries
PPT
Introduction to Python
PPTX
Python
PPTX
Python-Functions.pptx
PDF
What is Python Lambda Function? Python Tutorial | Edureka
PDF
Python Basics | Python Tutorial | Edureka
PPTX
Types of methods in python
PPT
Python List.ppt
PDF
Python decision making
PPTX
STRINGS IN PYTHON
PPT
Introduction to PHP
PPTX
Error and exception in python
PPTX
Exception handling with python class 12.pptx

More Related Content

PDF
Exception Handling In Python | Exceptions In Python | Python Programming Tuto...
PPTX
Python Exception Handling
PDF
Introduction to python programming
PPTX
Python-FileHandling.pptx
PPTX
Python Functions
PDF
Python programming : Strings
PPTX
Python basics
PPTX
Python ppt
Exception Handling In Python | Exceptions In Python | Python Programming Tuto...
Python Exception Handling
Introduction to python programming
Python-FileHandling.pptx
Python Functions
Python programming : Strings
Python basics
Python ppt

What's hot

PDF
Python exception handling
PDF
Python Flow Control
PDF
Object oriented programming c++
PPTX
File handling in Python
PDF
Python Basics
PDF
Strings in Python
PDF
Python functions
PPTX
Static Data Members and Member Functions
PDF
Python libraries
PPT
Introduction to Python
PPTX
Python
PPTX
Python-Functions.pptx
PDF
What is Python Lambda Function? Python Tutorial | Edureka
PDF
Python Basics | Python Tutorial | Edureka
PPTX
Types of methods in python
PPT
Python List.ppt
PDF
Python decision making
PPTX
STRINGS IN PYTHON
PPT
Introduction to PHP
Python exception handling
Python Flow Control
Object oriented programming c++
File handling in Python
Python Basics
Strings in Python
Python functions
Static Data Members and Member Functions
Python libraries
Introduction to Python
Python
Python-Functions.pptx
What is Python Lambda Function? Python Tutorial | Edureka
Python Basics | Python Tutorial | Edureka
Types of methods in python
Python List.ppt
Python decision making
STRINGS IN PYTHON
Introduction to PHP

Similar to Python programming : Exceptions

PPTX
Error and exception in python
PPTX
Exception handling with python class 12.pptx
PPTX
Exception Handling in python programming.pptx
PPTX
Download Wondershare Filmora Crack Latest 2025
PPTX
FL Studio Producer Edition Crack 24 + Latest Version [2025]
PPTX
EXCEPTION HANDLING class 12th computer science.pptx
PDF
Unit 4-Exception Handling in Python.pdf
PPTX
Exception Handling and Modules in Python.pptx
PPTX
Adobe Photoshop 2025 Cracked Latest Version
PDF
EXCEPTION HANDLING - PYTHON COMPUTER SCIENCE
PPTX
Exception Handling in Python programming.pptx
PPTX
Exception Handling in Python Programming.pptx
PDF
Exception handling in python
PDF
lecs101.pdfgggggggggggggggggggddddddddddddb
PPTX
Chapter-12 Error and exception handling.pptx
PPTX
EXCEPTIONS-PYTHON.pptx RUNTIME ERRORS HANDLING
PPTX
Exception Handling.pptx
PPTX
Python Lecture 7
PPTX
Exception handling.pptx
Error and exception in python
Exception handling with python class 12.pptx
Exception Handling in python programming.pptx
Download Wondershare Filmora Crack Latest 2025
FL Studio Producer Edition Crack 24 + Latest Version [2025]
EXCEPTION HANDLING class 12th computer science.pptx
Unit 4-Exception Handling in Python.pdf
Exception Handling and Modules in Python.pptx
Adobe Photoshop 2025 Cracked Latest Version
EXCEPTION HANDLING - PYTHON COMPUTER SCIENCE
Exception Handling in Python programming.pptx
Exception Handling in Python Programming.pptx
Exception handling in python
lecs101.pdfgggggggggggggggggggddddddddddddb
Chapter-12 Error and exception handling.pptx
EXCEPTIONS-PYTHON.pptx RUNTIME ERRORS HANDLING
Exception Handling.pptx
Python Lecture 7
Exception handling.pptx

More from Emertxe Information Technologies Pvt Ltd

PDF
PDF
PDF
PDF
PDF
Career Transition (1).pdf
Career Transition (1).pdf

Recently uploaded

PDF
[BDD 2025 - Mobile Development] Exploring Apple’s On-Device FoundationModels
PDF
[BDD 2025 - Full-Stack Development] Digital Accessibility: Why Developers nee...
PDF
PCCC25(設立25年記念PCクラスタシンポジウム):エヌビディア合同会社 テーマ2「NVIDIA BlueField-4 DPU」
PDF
[BDD 2025 - Artificial Intelligence] Building AI Systems That Users (and Comp...
PDF
[BDD 2025 - Full-Stack Development] Agentic AI Architecture: Redefining Syste...
PDF
Mastering UiPath Maestro – Session 2 – Building a Live Use Case - Session 2
PPTX
kernel PPT (Explanation of Windows Kernal).pptx
PDF
Top Crypto Supers 15th Report November 2025
PDF
Transforming Supply Chains with Amazon Bedrock AgentCore (AWS Swiss User Grou...
PDF
The Evolving Role of the CEO in the Age of AI
PDF
So You Want to Work at Google | DevFest Seattle 2025
PDF
How Much Does It Cost to Build an eCommerce Website in 2025.pdf
PDF
10 Best Automation QA Testing Software Tools in 2025.pdf
PDF
Crane Accident Prevention Guide: Key OSHA Regulations for Safer Operations
PPTX
Leon Brands - Intro to GPU Occlusion (Graphics Programming Conference 2024)
PDF
Transcript: The partnership effect: Libraries and publishers on collaborating...
PDF
"DISC as GPS for team leaders: how to lead a team from storming to performing...
 
PDF
The partnership effect: Libraries and publishers on collaborating and thrivin...
PPTX
Connecting the unconnectable: Exploring LoRaWAN for IoT
PDF
How Much Does It Cost To Build Software
[BDD 2025 - Mobile Development] Exploring Apple’s On-Device FoundationModels
[BDD 2025 - Full-Stack Development] Digital Accessibility: Why Developers nee...
PCCC25(設立25年記念PCクラスタシンポジウム):エヌビディア合同会社 テーマ2「NVIDIA BlueField-4 DPU」
[BDD 2025 - Artificial Intelligence] Building AI Systems That Users (and Comp...
[BDD 2025 - Full-Stack Development] Agentic AI Architecture: Redefining Syste...
Mastering UiPath Maestro – Session 2 – Building a Live Use Case - Session 2
kernel PPT (Explanation of Windows Kernal).pptx
Top Crypto Supers 15th Report November 2025
Transforming Supply Chains with Amazon Bedrock AgentCore (AWS Swiss User Grou...
The Evolving Role of the CEO in the Age of AI
So You Want to Work at Google | DevFest Seattle 2025
How Much Does It Cost to Build an eCommerce Website in 2025.pdf
10 Best Automation QA Testing Software Tools in 2025.pdf
Crane Accident Prevention Guide: Key OSHA Regulations for Safer Operations
Leon Brands - Intro to GPU Occlusion (Graphics Programming Conference 2024)
Transcript: The partnership effect: Libraries and publishers on collaborating...
"DISC as GPS for team leaders: how to lead a team from storming to performing...
 
The partnership effect: Libraries and publishers on collaborating and thrivin...
Connecting the unconnectable: Exploring LoRaWAN for IoT
How Much Does It Cost To Build Software

Python programming : Exceptions

  • 1.
  • 2.
  • 3.
  • 4.
    ErrorsCompile-TimeWhat? These aresyntactical errors found in the code, due to which programfails to compileExample Missing a colon in the statements llike if, while, for, def etcProgram Outputx = 1if x == 1print("Colon missing")py 1.0_compile_time_error.pyFile "1.0_compile_time_error.py", line 5if x == 1^SyntaxError: invalid syntaxx = 1#Indentation Errorif x == 1:print("Hai")print("Hello")py 1.1_compile_time_error.pyFile "1.1_compile_time_error.py", line 8print("Hello")^IndentationError: unexpected indent
  • 5.
    ErrorsRuntime - 1What?When PVM cannot execute the byte code, it flags runtime errorExample Insufficient memory to store something or inability of the PVM toexecute some statement come under runtime errorsProgram Outputdef combine(a, b):print(a + b)#Call the combine functioncombine("Hai", 25)py 2.0_runtime_errors.pyTraceback (most recent call last):File "2.0_runtime_errors.py", line 7, in <module>combine("Hai", 25)File "2.0_runtime_errors.py", line 4, in combineprint(a + b)TypeError: can only concatenate str (not "int") to str"""Conclusion:1. Compiler will not check the datatypes.2.Type checking is done by PVM during run-time."""
  • 6.
    ErrorsRuntime - 2What?When PVM cannot execute the byte code, it flags runtime errorExample Insufficient memory to store something or inability of the PVM toexecute some statement come under runtime errorsProgram Output#Accessing the item beyond the arrayboundslst = ["A", "B", "C"]print(lst[3])py 2.1_runtime_errors.pyTraceback (most recent call last):File "2.1_runtime_errors.py", line 5, in <module>print(lst[3])IndexError: list index out of range
  • 7.
    ErrorsLogical-1What? These errorsdepicts flaws in the logic of the programExample Usage of wrong formulasProgram Outputdef increment(sal):sal = sal * 15 / 100return sal#Call the increment()sal = increment(5000.00)print("New Salary: %.2f" % sal)py 3.0_logical_errors.pyNew Salary: 750.00
  • 8.
    ErrorsLogical-2What? These errorsdepicts flaws in the logic of the programExample Usage of wrong formulasProgram Output#1. Open the filef = open("myfile", "w")#Accept a, b, store the result of a/b into the filea, b = [int(x) for x in input("Enter two number: ").split()]c = a / b#Write the result into the filef.write("Writing %d into myfile" % c)#Close the filef.close()print("File closed")py 4_effect_of_exception.pyEnter two number: 10 0Traceback (most recent call last):File "4_effect_of_exception.py", line 8, in<module>c = a / bZeroDivisionError: division by zero
  • 9.
    ErrorsCommonWhen there isan error in a program, due to its sudden termination, the following thingscan be suspectedThe important data in the files or databases used in the program may be lostThe software may be corruptedThe program abruptly terminates giving error message to the user making the userlosing trust in the software
  • 10.
    ExceptionsIntroductionAn exception isa runtime error which can be handled by the programmerThe programmer can guess an error and he can do something to eliminate the harm caused bythat error called an ‘Exception’BaseExceptionExceptionStandardError WarningArthmeticErrorAssertionErrorSyntaxErrorTypeErrorEOFErrorRuntimeErrorImportErrorNameErrorDeprecationWarningRuntimeWarningImportantWarning
  • 11.
    ExceptionsException HandlingThe purposeof handling errors is to make program robustStep-1 try:statements#To handle the ZeroDivisionError Exceptiontry:f = open("myfile", "w")a, b = [int(x) for x in input("Enter two numbers: ").split()]c = a / bf.write("Writing %d into myfile" % c)Step-2 except exeptionname:statementsexcept ZeroDivisionError:print("Divide by Zero Error")print("Don't enter zero as input")Step-3 finally:statementsfinally:f.close()print("Myfile closed")
  • 12.
    ExceptionsProgram#To handle theZeroDivisionError Exception#An Exception handling Exampletry:f = open("myfile", "w")a, b = [int(x) for x in input("Enter two numbers: ").split()]c = a / bf.write("Writing %d into myfile" % c)except ZeroDivisionError:print("Divide by Zero Error")print("Don't enter zero as input")finally:f.close()print("Myfile closed")Output:py 5_exception_handling.pyEnter two numbers: 10 0Divide by Zero ErrorDon't enter zero as inputMyfile closed
  • 13.
    ExceptionsException Handling Syntaxtry:statementsexceptException1:handler1except Exception2:handler2else:statementsfinally:statements
  • 14.
    ExceptionsException Handling: Noteworthy-A single try block can contain several except blocks.- Multiple except blocks can be used to handle multiple exceptions.- We cannot have except block without the try block.- We can write try block without any except block.- Else and finally are not compulsory.- When there is no exception, else block is executed after the try block.- Finally block is always executed.
  • 15.
    ExceptionsTypes: Program-1#To handlethe syntax error given by eval() function#Example for Synatx errortry:date = eval(input("Enter the date: "))except SyntaxError:print("Invalid Date")else:print("You entered: ", date)Output:Run-1:Enter the date: 5, 12, 2018You entered: (5, 12, 2018)Run-2:Enter the date: 5d, 12m, 2018yInvalid Date
  • 16.
    ExceptionsTypes: Program-2#To handlethe IOError by open() function#Example for IOErrortry:name = input("Enter the filename: ")f = open(name, "r")except IOError:print("File not found: ", name)else:n = len(f.readlines())print(name, "has", n, "Lines")f.close()If the entered file is not exists, it will raise an IOError
  • 17.
    ExceptionsTypes: Program-3#Example fortwo exceptions#A function to find the total and average of list elementsdef avg(list):tot = 0for x in list:tot += xavg = tot / len(list)return tot.avg#Call avg() and pass the listtry:t, a = avg([1, 2, 3, 4, 5, 'a'])#t, a = avg([]) #Will give ZeroDivisionErrorprint("Total = {}, Average = {}". format(t, a))except TypeError:print("Type Error: Pls provide the numbers")except ZeroDivisionError:print("ZeroDivisionError, Pls do not give empty list")Output:Run-1:Type Error: Pls provide the numbersRun-2:ZeroDivisionError, Pls do not give empty list
  • 18.
    ExceptionsExcept Block: VariousformatsFormat-1 except Exceptionclass:Format-2 except Exceptionclass as obj:Format-3 except (Exceptionclass1, Exceptionclass2, ...):Format-4 except:
  • 19.
    ExceptionsTypes: Program-3A#Example fortwo exceptions#A function to find the total and average of list elementsdef avg(list):tot = 0for x in list:tot += xavg = tot / len(list)return tot.avg#Call avg() and pass the listtry:t, a = avg([1, 2, 3, 4, 5, 'a'])#t, a = avg([]) #Will give ZeroDivisionErrorprint("Total = {}, Average = {}". format(t, a))except (TypeError, ZeroDivisionError):print("Type Error / ZeroDivisionError”)Output:Run-1:Type Error / ZeroDivisionErrorRun-2:Type Error / ZeroDivisionError
  • 20.
    ExceptionsThe assert StatementItis useful to ensure that a given condition is True, It is not True, it raisesAssertionError.Syntax:assert condition, message
  • 21.
    ExceptionsThe assert Statement:ProgramsProgram - 1 Program - 2#Handling AssertionErrortry:x = int(input("Enter the number between 5 and 10: "))assert x >= 5 and x <= 10print("The number entered: ", x)except AssertionError:print("The condition is not fulfilled")#Handling AssertionErrortry:x = int(input("Enter the number between 5 and 10: "))assert x >= 5 and x <= 10, "Your input is INVALID"print("The number entered: ", x)except AssertionError as Obj:print(Obj)
  • 22.
    ExceptionsUser-Defined ExceptionsStep-1 classMyException(Exception):def __init__(self, arg):self.msg = argStep-2 raise MyException("Message")Step-3 try:#codeexcept MyException as me:print(me)
  • 23.
    ExceptionsUser-Defined Exceptions: Program#Tocreate our own exceptions and raise it when neededclass MyException(Exception):def __init__(self, arg):self.msg = argdef check(dict):for k, v in dict.items():print("Name = {:15s} Balance = {:10.2f}" . format(k, v)) if (v < 2000.00):raise MyException("Less Bal Amount" + k)bank = {"Raj": 5000.00, "Vani": 8900.50, "Ajay": 1990.00}try:check(bank)except MyException as me:print(me)
  • 24.

[8]ページ先頭

©2009-2025 Movatter.jp