Which of the following programming styles does Python support?
Anonymous Quiz
7%
Functional
9%
Procedural
30%
Object Oriented
50%
All of the above
4%
Show me the answer
print('abcefd'.replace('cd', '12'))
#What is the output of the above code?
#What is the output of the above code?
Anonymous Quiz
28%
ab1ef2
14%
ab12ef12
4%
ab1efd
3%
abcef2
22%
abcefd
21%
None of the above
7%
Show me the answer
x = 5,000.00
#What is the value of x. Explain Why?
#What is the value of x. Explain Why?
Anonymous Quiz
8%
5
2%
(5)
8%
(5,0.0)
22%
5000
7%
(5000)
29%
5000.00
14%
(5,000.00)
9%
Show me the answer
All keywords in Python are in?
Anonymous Quiz
46%
lower case
8%
UPPER CASE
7%
snake_case
8%
camel_case
6%
Capitalized
15%
None of the above
10%
Show me the answer
Which of the following is an invalid statement?
Anonymous Quiz
13%
xyz = 5,000.00
44%
x y z = 2500 2500 2500
11%
x,y,z = 33.33, 25, -45
15%
x_y_z = -123,456,67
12%
All are valid
5%
Show me the answer
Which of these in not a core datatype in Python 3?
Anonymous Quiz
4%
Lists
8%
Dictionary
43%
Class
5%
Tuple
35%
All are core data types
6%
Show me the answer
x = (round(4.5) - - round(-4.5))
# What is the value of x? Explain Why?
# What is the value of x? Explain Why?
Anonymous Quiz
34%
0
13%
9
8%
-9
18%
8
4%
-8
14%
Syntax Error
8%
Show me the answer
x = 5,000,000.00
type(x)
# What is the datatype of x? Explain Why?
type(x)
# What is the datatype of x? Explain Why?
Anonymous Quiz
6%
str
21%
int
53%
float
3%
list
8%
tuple
6%
Syntax Error
3%
Show me the answer
What is the maximum length allowed for an identifier in Python 3?
Anonymous Quiz
17%
64
13%
128
20%
256
21%
1024
18%
None of the above
11%
Show me the answer
'{} 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