What does the following code do?
counter= 1
While counter< 11:
print(counter)
Python Institute Practice exam 3
Quiz
•
Computers
•
11th Grade
•
Hard
Carla Gehlhausen
Used 2+ times
FREE Resource
28 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What does the following code do?
counter= 1
While counter< 11:
print(counter)
It prints numbers from1 to 11
ll prints numbers from1 to 10
It immediately shows an error
It prints the number 1 infinitely.
2.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What will be printed to the output after the following code?
for a in range(1, 6):
for bin range(1, 10):
if (a==b):
print(a)
1
2
3
4
5
6
1
2
3
4
5
6
7
8
9
10
Python will show an error because there's a loop inside a loop, which is not allowed
1
2
3
4
5
3.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What will be the output of the following code?
tup = (7, 14, 21)
tl = tup + (28, )
t2 = tup * 3
print(tl, t2)
Error
(7. 14. 21,28.) (7·3,14•,21•3)
(7, 14, 21)(21, 42, 63)
(7, 14, 21, 28) (7, 14, 21, 7, 14, 21, 7, 14, 21)
4.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What is the output of the code snippet, if the user provides the input as "Coding" when prompted?
inp = input()
print(inp * 4)
Coding * 4
CodingCodingCodingCoding
Coding4
coding coding coding coding
5.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which of the following is a valid variable name in Python?
1do
do+1
A, C and E
None of these answers
do it
6.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What do you call a program that can directly execute instructions from a programming language ?
Interpreter
Translator
Assembler
Compiler
7.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Select the correct output of the below code:
print(17%3}
print(14%3.5)
5
4.0
2
0.0
5.66
4.0
6
4.0
30 questions
Python L1 Programming Challenge
Quiz
•
1st - 12th Grade
25 questions
Intro to CS Unit 3 Review
Quiz
•
9th - 12th Grade
30 questions
11 Final Test
Quiz
•
11th Grade
25 questions
Data Types- Python
Quiz
•
7th - 11th Grade
25 questions
Python for Absolute Beginners
Quiz
•
8th - 12th Grade
26 questions
Python set 1
Quiz
•
9th - 12th Grade
25 questions
8th Grade (Programming B)
Quiz
•
8th - 12th Grade
25 questions
PYTHON QUIZ 1
Quiz
•
11th - 12th Grade
15 questions
Multiplication Facts
Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz
Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set
Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025
Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)
Quiz
•
9th - 12th Grade
15 questions
June Review Quiz
Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles
Quiz
•
8th Grade
25 questions
Triangle Inequalities
Quiz
•
10th - 12th Grade
40 questions
Week 4 Student In Class Practice Set
Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025
Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)
Quiz
•
9th - 12th Grade
25 questions
Triangle Inequalities
Quiz
•
10th - 12th Grade
10 questions
Right Triangles: Pythagorean Theorem and Trig
Quiz
•
11th Grade
65 questions
MegaQuiz v2 2025
Quiz
•
9th - 12th Grade
10 questions
GPA Lesson
Lesson
•
9th - 12th Grade
15 questions
SMART Goals
Quiz
•
8th - 12th Grade