Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
A program deletes a slice with a step from a list, and then adds one item. What does the program print?
Python Programming
Hard
High School (9–10)
Python Basics › Lists
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A program deletes a slice with a step from a list, and then adds one item.
v = [7, 14, 21, 28, 35, 42] del v[::2] v.append(v[0] + v[-1]) print(v)
What does the program print?
[14, 28, 42, 56]
[7, 21, 35, 42]
[14, 28, 42, 49]
It stops with
TypeError
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A loop doubles every value of a dictionary, taking the keys in sorted order. Then the program looks at the dictionary in two ways. What does the program print?
A function prints the length of a tuple, but it has no return statement. The program prints what the call gives back. What does the program print? →
More on
Python Basics › Lists
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
Here is a table of marks: one row for each student, and one column for each test…
Medium
What do a and b show at the end? Say it before you run it.
Medium
The list is marks = [45, 78, 90, 62, 38, 85, 71]…
Easy
Find the position
Easy
All problems on this topic →