'{} was created by {1} and first released in {2}'.format('Python','Guido van Rossum','1991')
#What is the output of the code shown above?
#What is the output of the code shown above?
Anonymous Quiz
62%
Python was created by Guido van Rossum and first released in 1991
15%
Guido van Rossum was created by 1991 and first released in Python
9%
{} was created by {1} and first released in {2}
9%
Error
6%
Show me the answer
x = - - -5
#What is the value of x
#What is the value of x
Anonymous Quiz
13%
5
54%
-5
4%
11
4%
-11
15%
None of the above
10%
Show me the answer
Which of the following is a valid statement and runs without error?
Anonymous Quiz
53%
round(45.8)
8%
round(7463.123.3.3)
20%
round()
8%
round(6352.898,2,5)
6%
None of the above
6%
Show me the answer
x = bin((3**9) -1) == '{}'.format(bin((3**9) -1))
What is the value of x? Explain?
What is the value of x? Explain?
Anonymous Quiz
20%
19682
30%
True
19%
False
11%
729
7%
None of the above
13%
Show me the answer
x='{0}, {1}, and {2}'
x.format('hello', 'Python Club', 'members')
# What is the output of this code.
x.format('hello', 'Python Club', 'members')
# What is the output of this code.
Anonymous Quiz
29%
‘hello Python Club and members’
22%
‘hello, Python Club, members’
28%
‘hello, Python Club, and members’
17%
Syntax Error
4%
Show me the answer
x=56.236
print("%.2f"%x)
What is the result of these statements?
print("%.2f"%x)
What is the result of these statements?
Anonymous Quiz
9%
56.00
17%
56.236
21%
56.24
31%
56.23
10%
0056.236
11%
Show me the answer
x = [1, 23, 'hello', 1]
type(x)
# What datatype of x? Explain?
type(x)
# What datatype of x? Explain?
Anonymous Quiz
5%
str
66%
list
6%
dict
8%
array
7%
tuple
4%
error
3%
Show me the answer
x=1.23456789
'%f | %e | %g' %(x, x, x)
#What is the result? Explain Why?
'%f | %e | %g' %(x, x, x)
#What is the result? Explain Why?
Anonymous Quiz
17%
1.23456789 | 1.23456789+00 | 1.234567
26%
1.234568 | 1.234568e+00 | 1.23457
19%
1.234567 | 1.234567e+00 | 1.234567
17%
Error
5%
None of the above
15%
Show the answer
x, y = 5, 6
x+y == _____
#Which of the following statements is equal to x+y?
x+y == _____
#Which of the following statements is equal to x+y?
Anonymous Quiz
21%
x.__add(y)
34%
x.__add__(y)
9%
x.__ADD__(y)
5%
x.__ADD(y)
18%
None of the above
13%
Show me the answer
x = "Python World"
x[3] = 's'
# What is the value of x? Can you explain Why?
x[3] = 's'
# What is the value of x? Can you explain Why?
Anonymous Quiz
13%
Python World
6%
python world
52%
Pytson World
8%
Pyshon World
17%
Error
5%
Show me the answer
print('*', "abcdef".center(7), '*')
# What is the output? Can you Explain?
# What is the output? Can you Explain?
Anonymous Quiz
17%
*abcdef*
18%
* abcdef *
18%
* abcdef *
17%
* abcdef *
16%
Error
14%
Show me the answer
https://t.me/python_interview_questions/117
Only 14% got this correct.
Only 14% got this correct.
None of the above
True, False and None are capitalized, that is the first letter in these keywords start with a Capital letter.
The rest of all the other keywords are in lower case.
Hence, the correct answer is "
".
Telegram
Python Questions
All keywords in Python are in?
lower case / UPPER CASE / snake_case / camel_case / Capitalized / None of the above / Show me the answer
lower case / UPPER CASE / snake_case / camel_case / Capitalized / None of the above / Show me the answer
print("abbcabcacabb".count('abb', 2, 11))
#What is the output of the above statement? Explain this statement?
#What is the output of the above statement? Explain this statement?
Anonymous Quiz
27%
2
24%
1
14%
0
21%
Error
14%
Show me the answer
x = “python”+1+2+3
# What is the value of x? Explain?
# What is the value of x? Explain?
Anonymous Quiz
27%
python123
11%
"python",1,2,3
21%
python6
34%
Error
3%
None of the above
4%
Show me the answer
print('xy'.isalpha())
#What is the output of the above code?
#What is the output of the above code?
Anonymous Quiz
8%
xy
51%
True
21%
False
10%
xy.isalpha
4%
Error
6%
Show me the answer
print('1.1'.isnumeric())
#What is the output? Explain this.
#What is the output? Explain this.
Anonymous Quiz
7%
1
11%
1.1
44%
True
27%
False
5%
Error
1%
None of the above
5%
Show me the answer
x = (round(4.5) - round(-4.5))
#What is the value of x
#What is the value of x
Anonymous Quiz
35%
0
28%
9
8%
-9
16%
8
2%
-8
4%
None of the Above
7%
Show me the answer
print(r"\npython")
#What is the output? Explain Why?
#What is the output? Explain Why?
Anonymous Quiz
39%
New line and 'python'
23%
\npython
10%
r\npython
6%
r,python
12%
Error
10%
Show me the answer
print('KLM'.maketrans('KLM', '123'))
What is the output? Explain the function maketrans()
What is the output? Explain the function maketrans()
Anonymous Quiz
11%
{65: 49, 66: 50, 67: 51}
26%
{75: 49, 76: 50, 77: 51}
14%
{75: 49, 66: 50, 77: 51}
17%
None of the above
31%
Show me the answer
print('iGnani'.translate({'i': '1', 'G': '2', 'n': '3', 'a': '4', 'i': '5'}))
#What is the output. Explain translate()
#What is the output. Explain translate()
Anonymous Quiz
39%
123435
20%
12345
16%
iGnani
9%
Error
5%
None of the above
12%
Show me the answer
print('pyypyypypyppy'.replace('py', 'iG', 3))
#What is the output?
#What is the output?
Anonymous Quiz
8%
pyypyypypyppy
25%
iGyiGyiGiGpiG
35%
iGyiGyiGpyppy
11%
Error
9%
None of the above
12%
Show me the answer