Use a list comprehension to display the numbers from 1 through 30 inclusive that are divisible by 3.

What will be an ideal response?

>>> [n for n in range(1,31) if n % 3 == 0]
[3, 6, 9, 12, 15, 18, 21, 24, 27, 30]

Computer Science & Information Technology

You might also like to view...

A citation indicating the source of the information that appears in a content placeholder should appear ________

A) in the same content placeholder but in a smaller font B) in the same format as the information cited C) on a slide at the end of the presentation D) as a different color than the cited information

Computer Science & Information Technology

A(n) ____ tree T is a simple graph such that if u and v are two vertices in T, a unique path exists from u to v.

A. rooted B. free C. spanning D. weighted

Computer Science & Information Technology