From 6286523867d0716eb8cb9278cbd55155e7178978 Mon Sep 17 00:00:00 2001 From: somali7 <65849880+somali7@users.noreply.github.com> Date: Fri, 14 Jul 2023 12:49:17 +0530 Subject: [PATCH] Create Somali_sol_3.txt --- .../Code Snippet Exercise-III/Somali_sol_3.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 14 July (Live Session Submission)/Code Snippet Exercise-III/Somali_sol_3.txt diff --git a/14 July (Live Session Submission)/Code Snippet Exercise-III/Somali_sol_3.txt b/14 July (Live Session Submission)/Code Snippet Exercise-III/Somali_sol_3.txt new file mode 100644 index 0000000..08fc14a --- /dev/null +++ b/14 July (Live Session Submission)/Code Snippet Exercise-III/Somali_sol_3.txt @@ -0,0 +1,11 @@ +def ADI_Fun(a , b): + try: + c = ((a+b) / (a-b)) + except ZeroDivisionError: + print ("a/b result in 0") + else: + print (c) +ADI_Fun (2.0, 3.0) +Output: -5 +ADI_Fun (3.0, 3.0) +Output : "a/b result is 0"