What is the output?
print( str( 11%3 ) + "2" )
2
3
5
5.0
22
What is the output?
a = 12345
b = '12345'
if str(a) = b:
print(a)
12345
Blank
An error
What is the output?
a = [ 12, 34 , 56, 78]
print( a[-2:] )
[34]
[56]
[34,56]
[56,78]
What is the output? The code does not make errors.
a = "1234"
print( a[:2] )
3
4
12
23
What is the output?
if (1 == 1 or 4 == 2**2) and 1 != 1:
print("YES")
else:
print("NO")
YES
NO
Blank
An error
What is the output?
print( str( 2**3 ) + "2" )
6
8
62
82
What is the output?
a = 12345
b = '12345'
if str(a) != b:
print(a)
else:
print('123')
12345
Blank
123
An error
What is the output?
a = [ 12, 34 , 56, 78]
print( a[:-2] )
[34,56]
[56,78]
[12,34,56]
None of these
What is the output? The code does not make errors.
a = "1234"
print( a[:-2] )
12
23
34
None of these
What is the output?
if (1 == 1 or 4 == 2**2) and true:
print("YES") else: print("NO")
YES
NO
An error
Blank
What is the output?
a = 1
if float(a)%2 == 0:
print('It is an integer')
else:
print('It is NOT an integer')
It is an integer
It is NOT an integer
Blank
["Fresh", "Bagels", "available", "near," "you"]
What is the output?
a=1
B=2
Print(a+b)
1
2
3
An error
What is the output?
print("Computational Physics"[0:5])
Compu
Compu
Comput
An error
What is the output?
print("Computational Physics"[100:200])
Compu
An error
Compu
Blank
What is the output?
print("Computational Physics"[-5:-1])
Ysics
Ysic
Comp
An error
What is the output?
print("Computational Physics"[-1:1])
Omputational Physic
Omputational Physics
''
An error
What is the output?
print("Computational Physics"[1:-1])
Omputational Physic
Omputational Physics
''
An error
What is the output?
a = 12345
print(a[1:4])
1234
2345
234
An error
What is the output?
a = '12345'
print(a[1:4])
1234
2345
234
An error
What is the output?
a = [1,2,3,4,5]
print(a[1:4])
[1234]
[2345]
[2,3,4]
"2,3,4"
What is the output?
a = ['1','2','3','4','5']
print(a[-4:-1])
[1234]
[2345]
[2,3,4]
"2,3,4"
What is the output?
a = [1,2,3,4,5]
print(a[-4:-1])
[1234]
[2345]
[2,3,4]
"2,3,4"
What is the output?
a=True
b=False
c=False
if a or b:
print("Computational")
else:
print("Physics")
Computational
Physics
Computational Physics
An error
What is the output?
a=True
b=False
c=False
if a and b:
print("Computational")
else:
print("Physics")
Computational
Physics
Computational Physics
An error
What is the output?
a=true
b=false
c=false
if a or b:
print("Computational")
else:
print("Physics")
Computational
Physics
Computational Physics
An error
What is the output?
a=True
b=False
c=False
if (a or b) and c:
print("Computational")
else:
print("Physics")
Computational
Physics
Computational Physics
An error
What is the output?
a=True
b=False
c=False
if a or (b and c):
print("Computational")
else:
print("Physics")
Computational Physics
Computational
Physics
An error
What is the output?
a=True
b=False
c=False
if a or b and c:
print("Computational")
else:
print("Physics")
Computational
Physics
Computational Physics
An error
What is the output?
a = 'abcde'
b = 'I love Python.'
for k in a:
print(k)
Abcde
A b c d e
A b c d e (On separate lines)
An error
What is the output?
a = 'abcde'
b = 'I love Python.'
for k in len(a):
print(k)
Abcde
A b c d e
A b c d e (On separate lines)
An error
What is the output?
a = 'abcde'
b = 'I love Python.'
for k in range(len(a)):
print(k)
Abcde
0 1 2 3 4 (On separate lines)
A b c d e (On separate lines)
An error
What is the output?
a = 'abcde'
b = 'I love Python.'
for k in range(len(a)):
print(b[k].split())
I love Python.
I lov
I lov (On separate lines)
An error
What is the output?
a = 'abcde'
b = 'I love Python.'
for k in range(len(a)):
print(a[k])
Abcde
0 1 2 3 4 (On separate lines)
A b c d e (On separate lines)
An error
What is the output?
a = 'abcde'
b = 'I love Python.'
for k in range(len(a)):
print(b[k])
I love Python
I lov
I lov (On separate lines)
An error
What is the output?
a = 'abc'
b = '123'
c = a + b
print(c)
Abc 123
Abcabc
Abc123
An error
What is the output?
a = '1 2 3'
c = [1,2,3]
print(a==c)
True
False
An error
"Watch The Sopranos for ps2 on HBOMax"
What is the output?
a = '1 2 3'
c = [1,2,3]
print(a[0]==c[0])
0%
0
0%
0
0%
0
0%
0
What is the output?
a = '1 2 3'
c = [1,2,3]
print(int(a[0])==c[0])
True
False
An error
Nicely done
What is the output?
a = '1 2 3'
b = a.split()
c = [1,2,3]
print(b==c)
True
False
An error
Abraham Lincoln
What is the output?
a = '123'
print(a*2)
123123
246
112233
An error
What is the output?
a = '1 2 3'
c = [1,2,3]
print(c*2)
[1,2,3,1,2,3]
[2,4,6]
[1,1,2,2,3,3]
An error
What is the output?
a = '1 2 3'
c = [1,2,3]
print(c*3)
[1,2,3,1,2,3,1,2,3]
[3,6,9]
[1,1,1,2,2,2,3,3,3]
An error
What is the output?
a = '1 2 3'
c = [1,2,3]
print(a*-2)
'-1 -2 -3'
'-2 -4 -6'
''
An error
What is the output?
a = '1 2 3'
c = [1,2,3]
print(c*-3)
[-1,-2,-3]
[-3,-6,-9]
[]
An error
{"name":"What is the output? print( str( 11%3 ) + \"2\" )", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is the output? print( str( 11%3 ) + \"2\" ), What is the output? a = 12345 b = '12345' if str(a) = b: print(a), What is the output? a = [ 12, 34 , 56, 78] print( a[-2:] )","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
More Quizzes
What Programming Language Are You?
7451
RYANS QUIZ
10525
Marvel Quiz
630
Tudor qwiz
210
Evaluación New Joiner Mex
1680
You and the law Vocab Quiz
41200
Diagnostic Test
32160
Counter for Books (magazines, notebooks, dictionaries etc.)
11615
My quizzzzzzzzzzzzzzzzzzz
740
The Ultimate Fun Quiz
4217
Chalet
9422
Love Shack
27140