ProgrammingHardTCS NQT · Infosys

What is printed?

What is printed?
print(int('٣٣') * 2, '٣٣'.isdigit(), '٣٣'.isascii(), '3' == '٣')
  1. A. 66 True True False
  2. B. 33 True False False
  3. C. 66 True False False
  4. D. 66 False False False

Correct answer: C. 66 True False False

int() reads Arabic-Indic digits as their values, so 33 times 2 is 66. isdigit is True, isascii is False, and the two strings are different characters.

More Python Programming questions

Exams that ask this topic