0% found this document useful (0 votes)
4 views2 pages

Python Basic Math Operations Code

Math python

Uploaded by

kagwadeashok5
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Python Basic Math Operations Code

Math python

Uploaded by

kagwadeashok5
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Name: Akanksha Ashok Kagwade

Batch: A1

Roll No: 03

Assignment No:- 05
Program:
def add (a,b):

"""Returns the sum of two number."""

return a+b

def subtract(a,b):

"""return the difference of two number"""

return a-b

def multiply (a,b):

"""return the product of two number."""

return a*b

def divide (a,b):

"""return the quotient of two numers."""

if b==0:

return "cannot divide by zero!"

return a/b
Program:

import math_operations as mo

sum_result=[Link](10,5)

difference=[Link](10,5)

product=[Link](10,5)

quotient=[Link](10,5)

print("sum",sum_result)

print("difference",difference)

print("product",product)

print("quotient",quotient)

print("divided by zero",[Link](10,0))

Output:-

You might also like