Int Assignment
Int Assignment
Q. Take one int value either less than -5 or greater than 256.
Assign it to two different variables.
Check the id of both the variables. It should come different.Check why?
print(not 10)
#----------------------------------------->Output is False
print(not 0)
#----------------------------------------->Output is True
Q. What is the output of expression inside print statement. Cross check
before running the program.
a = 10
b = 10
print(a is b) #True or False?
print(a is not b) #True or False?
a = 1000
b = 1000
print(a is b) #True or False?
print(a is not b) #True or False?
Q. Membership operation
in, not in are two membership operators and it returns boolean value
b = 0o7436
print(b)
c = 0xfade
print(c)
print(bin(80))
print(oct(3870))
print(hex(64222))
print(bin(0b1010000))
print(bin(0xfade))
print(oct(0xfade))
print(oct(0o7436))
print(hex(0b1010000))
print(hex(0xfade))