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 changes one item of a list and then reads from it. What does the program print?
Python Programming
Easy
High School (9–10)
Python Basics › Lists
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A program changes one item of a list and then reads from it.
colours = ["red", "green", "blue", "pink"] colours[1] = "gold" print(colours[-1], len(colours), colours[1])
What does the program print?
pink 4 gold
blue 4 gold
pink 4 green
pink 5 gold
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A program searches a table, stored as a list of lists, for a negative number. It uses break, continue and a loop else to stop both loops. What does the program print?
A program puts a new number into a list with insert(), and then asks the list two questions. 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 →