From 63e138b02373111fe079b839bacb7a3a242a7c4d Mon Sep 17 00:00:00 2001 From: Jerald Jacob Date: Fri, 1 Oct 2021 09:06:32 +0530 Subject: [PATCH 1/2] Create qn_27.txt --- Basic-Part-2/questions/qn_27.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 Basic-Part-2/questions/qn_27.txt diff --git a/Basic-Part-2/questions/qn_27.txt b/Basic-Part-2/questions/qn_27.txt new file mode 100644 index 0000000..3f8dfbb --- /dev/null +++ b/Basic-Part-2/questions/qn_27.txt @@ -0,0 +1 @@ +What is the difference between .py and .pyc files? From a21afa879f9b1a4e7c01eed46633921b6b37884e Mon Sep 17 00:00:00 2001 From: Jerald Jacob Date: Tue, 5 Oct 2021 09:14:43 +0530 Subject: [PATCH 2/2] Create qn_26.txt --- Basic-Part-1/source-code/qn_26.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Basic-Part-1/source-code/qn_26.txt diff --git a/Basic-Part-1/source-code/qn_26.txt b/Basic-Part-1/source-code/qn_26.txt new file mode 100644 index 0000000..f4f4fbc --- /dev/null +++ b/Basic-Part-1/source-code/qn_26.txt @@ -0,0 +1,17 @@ +def multiplication_or_sum(num1, num2): + # calculate product of two number + product = num1 * num2 + # check if product is less then 1000 + if product <= 1000: + return product + else: + # product is greater than 1000 calculate sum + return num1 + num2 + +# first condition +result = multiplication_or_sum(20, 30) +print("The result is", result) + +# Second condition +result = multiplication_or_sum(40, 30) +print("The result is", result)