ProgrammingHardTCS NQT · Wipro pattern
What is printed?
What is printed?
print(chr(0x41), ord('\n'))- A. A 13
- B. A 10
- C. C 10
- D. B 10
Correct answer: B. A 10
0x41 is the code point of A, and the newline character has code point 10.
More Python Programming questions
- What is printed? python from collections import Counter a = [1, 1, 2, 3, 3] c = Counter(a) print(sum(c[x] c[4 - x] for x in c))
- What is printed? python def nlis(a): n = len(a) L = [1] n C = [1] n for i in range(n): for j in range(i): if a[j] < a[i]: if L[j] + 1 >…
- What is printed? python print(bin(29 ^ 15).count('1'))
- What is printed? python from functools import lrucache @lrucache(maxsize=None) def p(n, m): if n == 0: return 1 if n < 0 or m == 0: return…
- What is printed? python import math print(sum(map(int, str(math.factorial(10)))))
- What is printed? python x = 'abc' print(x.islower() and x.isalpha(), ''.isdigit())