1.

What will be displayed by print(ord(‘b’) – ord(‘a’))?(a) 0(b) 1(c) -1(d) 2

Answer» Correct option is (b) 1

Easy explanation - ASCII value of b is one more than a. Hence the output of this code is 98-97, which is equal to 1.


Discussion

No Comment Found