Python Print Function and Arithmetic operator

Print Function 
Arithmetic Operation in Python 


#print Function 
print(‘Hello Python’)

#Get Data from user
#input function get data always as a string 
ainput(‘Enter Your Name’)
print(“Welcome”,a)

#Arithmetic Operation in Python 
a=int(input(“Enter 1st Number: “))
b=int(input(“Enter 2ns Number:”))
#Here We use int() function to get data as Integer value
c=a+b
d=ab
e=a*b
f=a/b
g=a//b #Result low to nearest whole Number
h=a%b  #Modulus Consider Reminder as Result 
i=a**b #Expontional Operator 
print(“Sum=”,c)
print(“Subtraction=”,d)
print(“Multiply=”,e)
print(“Division =”,f)
print(“Division Result low to nearest whole Number “g)
print(“Modulus =”,h)
print(“B Power of A =”i)

Out Put :

PS C:UsersSHEOKAND> & “C:/Program Files/Python39/python.exe” c:/Users/SHEOKAND/Desktop/first.py
Hello Python
Enter Your Name Demo
Welcome Demo
Enter 1st Number: 100
Enter 2ns Number:10
Sum= 110
Subtraction= 90
Multiply= 1000
Division = 10.0
Division Result low to nearest whole Number 10
Modulus = 0
B Power of A = 100000000000000000000
PS C:UsersSHEOKAND>

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *