What is the output of the following code?
var1 = 1
var2 = 2
var3 = "3"
print(var1 + var2 + var3)
Phyton Basic Quiz
Quiz
•
Computers
•
11th Grade
•
Easy
Nitika Chanana
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
var1 = 1
var2 = 2
var3 = "3"
print(var1 + var2 + var3)
6
33
123
Error. Mixing operators between numbers and strings are not supported
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
p, q, r = 10, 20 ,30
print(p, q, r)
10
20
10 20 30
Error: invalid syntax
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
valueOne = 5 ** 2
valueTwo = 5 ** 3
print(valueOne)
print(valueTwo)
10
15
25
125
55
555
Error: invalid syntax
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
for i in range(10, 15, 1):
print( i, end=', ')
10 11 12 13 14 15
10, 11, 12, 13, 14,
10, 11, 12, 13, 14,15,
10 11 12 13 14
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
var = "James" * 2 * 3
print(var)
JamesJamesJamesJamesJamesJames
JamesJamesJamesJamesJames
JamesJames
Error: invalid syntax
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following
x = 36 / 4 * (3 + 2) * 4 + 2
print(x)
182
37
117
The Program executed with errors
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
def calculate (num1, num2=4):
res = num1 * num2
print(res)
calculate(5, 6)
20
30
24
The program executed with errors
13 questions
Programming Quiz 2
Quiz
•
11th Grade
15 questions
Python End of Topic Quiz
Quiz
•
8th Grade - University
12 questions
Python Programming Basics
Quiz
•
7th - 11th Grade
7 questions
OCR Computer Science 2.3 Testing
Quiz
•
8th - 11th Grade
15 questions
GCSE - 2.3 Producing Robust Programs
Quiz
•
9th - 11th Grade
11 questions
Control Structures - Selection in Python
Quiz
•
8th Grade - University
10 questions
KS3 GCSE Computer Science (Programming / Python)
Quiz
•
7th - 11th Grade
13 questions
Python Level 1 Quiz
Quiz
•
10th - 11th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University