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...

Rectangles have a Stroke property, which defines the color of the shape’s outline. If either the Fill or the Stroke is not specified, that property will be rendered ________. a)

a) translucently b) opaquely c) shaded d) transparently

Computer Science & Information Technology

The iPhone was introduced in

a. 2004 b. 2007 c. 2010

Computer Science & Information Technology

Which of the following appears in the PivotTable Fields task pane?

A) Plot area B) Filter area C) Rows area D) Choose fields to add to report

Computer Science & Information Technology

Queries evaluate multiple sort fields in a left-to-right order making the leftmost sort field the primary sort field.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology