Class Name: Interview Questions and Answers for Software Developer Roles
Class Session: Free assessment - Netflix questions (Part 2)
Total Questions: 10 | Duration: 15 Mins
1)
What is the output of the following?
print('xyyxyyxyxyxxy'.replace('xy', '12', 100))
2) Suppose t = (1, 2, 4, 3), which of the following is incorrect?
3)
What is the output of the code shown below?
l1=[1, 2, 3, [4]]
l2=list(l1)
id(l1)==id(l2)
4) What is the result of the expression if x=15 and y=12:
5)
What is the output of the code shown below?
class Truth:
pass
x=Truth()
bool(x)
6)
What is the value of x if:
x = int(43.55+2/2)
7)
What is the value of the following expression:
24//6%3, 24//4//2
8)
What is the output of the following piece of code?
a={1:"A",2:"B",3:"C"}
print(a.get(1,4))
9)
What is the output of the following?
print("abcdef".center(7, '1'))
10)
What is the output of the following code?
>>> a,b=6,7
>>> a,b=b,a
>>> a,b