. Operators In Python

[1]:
123
var1 = 7
var2 = 4
print(var1%var2) # Reminder 
Out[1]:
3
[3]:
123
var1 = 7
var2 = 4
print(var1//var2) # Quotient 
stdout
1
[ ]:
1
[ ]:
12
Q2. find out if quotient of below 2 division are same or not.
27/5 , 30/5
[ ]:
1
[ ]:
12
Q3. For below 2 divisions identify if reminder of first division is greater than second
27/5 , 30/5
[ ]:
1
[ ]:
1
Q4. Find the are of a right angles triangle with base=4 and height =3.
[ ]:
1
[11]:
12345
# Consider below operations
a = 5          # initialize the value of a          
print("Is this statement true?:",a > 3 and a < 5)  
print('Any one statement is true?:',a > 3 or a < 5)  
print('Each statement is true then return False and vice-versa:',(not(a > 3 and a < 5)))  
stdout
Is this statement true?: False Any one statement is true?: True Each statement is true then return False and vice-versa: True