Skip to main content
Contents
Dark Mode Prev Up Next Scratch ActiveCode Profile
\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 12.7 Drill and Practice
Checkpoint 12.7.1 .
The variable
nested contains a nested list. Assign βsnakeβ to the variable
output using indexing.
Checkpoint 12.7.2 .
Below, a list of lists is provided. Use in and not in tests to create variables with Boolean values. See comments for further instructions.
Checkpoint 12.7.3 .
Below, weβve provided a list of lists. Use in statements to create variables with Boolean values - see the ActiveCode window for further directions.
Checkpoint 12.7.4 .
Iterate through the contents of
l_of_l and assign the third element of sublist to a new list called
third.
Checkpoint 12.7.5 .
Given below is a list of lists of athletes. Create a list,
t, that saves only the athleteβs name if it contains the letter βtβ. If it does not contain the letter βtβ, save the athlete name into list
other.
You have attempted
of
activities on this page.