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
19%
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
67%
list
6%
dict
8%
array
7%
tuple
4%
error
3%
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
23%
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('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