s = 0
for d in range(0, 5, 0.1):
s += d
print(s)
Python Data Structures
Quiz
•
Computers
•
University - Professional Development
•
Hard
secondary purpose
Used 144+ times
FREE Resource
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
s = 0
for d in range(0, 5, 0.1):
s += d
print(s)
Syntax Error
Type Error
Name Error
Traceback Error
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Output of: max(''please help '')
please help
Error
p
s
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What command is used to shuffle a list ‘L’?
L.shuffle()
random.shufflelist(L)
shuffle(L)
random.shuffle(L)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is used to define a block of code (body of loop, if else etc.) in Python?
Indentation
Curly Braces
Parenthesis
Quotation
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the following code, i is a/an _______?
i = (2)
String
Tuple
Int
Boolean
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the following program?
language = ['P', 'y', 't', 'h', 'o', 'n']
print(language[:-4])
['t']
['P','y']
['P','y','t']
['t','h','o','n']
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Suppose a tuple test contains 5 elements. How can you set the 3rd element of the tuple to ‘Python’?
test[2] = 'Python'
test[3] = 'Python'
test(2) = 'Python'
Elements of tuple cannot be changed
21 questions
Basic Python Console Operations
Quiz
•
10th Grade - University
27 questions
Python Quiz
Quiz
•
Professional Development
25 questions
Python Programming Basics 1
Quiz
•
University
25 questions
UTS Algoritma dan Pemrograman
Quiz
•
University
25 questions
C PROGRAMMING
Quiz
•
University
25 questions
PYTHON CONTERST 3
Quiz
•
University
21 questions
Quiz 3.1
Quiz
•
Professional Development
25 questions
python_quiz
Quiz
•
University
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