Artificial Intelligence
Artificial Intelligence
Intelligence
PYTHON
PROGRAMS
1) Program to perform all arythematic
operations
o a=int(input("Enter first number :"))
o b=int(input("Enter second number :"))
o sum=a+b
o dif=a-b
o mul=a*b
o quo=a/b
o rem=a%b
o exp=a**b
o print("Sum is : ",sum)
o print("Difference is : ",dif)
o print("Product is : ",mul)
o print("Quotient is : ",quo)
o print("Remainder is : ",rem)
o print("Exponent is : ",exp)
2) Program to power entering two numbers
• n= int(input("Enter a number :
"))
• if (n%2)==0:
• print(n , " is Even number")
• else:
• print(n , " is Odd number“)
9) Program to subtract smaller number
from larger
number