Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Basic-Part-1/source-code/qn_26.txt
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions Basic-Part-2/questions/qn_27.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
What is the difference between .py and .pyc files?