1. What is the output of the following code?
var1 = 1
var2 = 2
var3 = "3"
print(var + var2 + var3)
PYTHON PROGRAMMING
Quiz
•
Computers
•
11th - 12th Grade
•
Hard
PADMAVATHY V
Used 93+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
1. What is the output of the following code?
var1 = 1
var2 = 2
var3 = "3"
print(var + var2 + var3)
6
33
123
ERROR
2.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
2. 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
3. What is the Output of the following code?
for x in range(0.5, 5.5, 0.5):
print(x)
[0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5]
[0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5]
The Program executed with errors
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
4. What is the output of the following code?
salary = 8000
def printSalary():
salary = 12000
print("Salary:", salary)
printSalary()
print("Salary:", salary)
Salary: 12000 Salary: 8000
Salary: 8000 Salary: 12000
The program failed with errors
5.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
5. What is the output of the following code?
def calculate (num1, num2=4):
res = num1 * num2
print(res)
calculate(5, 6)
20
The program executed with errors
30
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
6. Can we use the “else” clause for loops?
for example:
for i in range(1, 5):
print(i)
else:
print("this is else block statement" )
YES
NO
7.
MULTIPLE SELECT QUESTION
10 sec • 1 pt
7. A string is immutable in Python?
Every time when we modify the string, Python Always creates a new String and assigns a new string to that variable.
TRUE
FALSE
15 questions
Python End of Topic Quiz
Quiz
•
8th Grade - University
10 questions
Data Handling in Python
Quiz
•
11th Grade
15 questions
Python Revision Tour - I
Quiz
•
12th Grade
18 questions
Computer Science LISTS
Quiz
•
12th Grade
20 questions
List Manipulations
Quiz
•
11th Grade
20 questions
Python Basics Review (TSK)
Quiz
•
9th - 12th Grade
16 questions
Python U2M3 Test
Quiz
•
9th - 12th Grade
14 questions
9.1.2 - Starter Quiz
Quiz
•
7th - 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
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
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