Which statement correctly creates a set named rainbow that contains the 7 colors in a rainbow?
A. colors = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"]
rainbow = set(colors)
B. colors = {red, orange, yellow, green, blue, indigo, violet}
rainbow = colors
C. colors = {red, orange, yellow, green, blue, indigo, violet}
rainbow = colors
D. colors = {"red", "orange", "yellow", "green", "blue", "indigo", "violet"}
rainbow = colors.set
Answer: A. colors = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"]
rainbow = set(colors)
You might also like to view...
The clone method return type is:
a. the same as the cloned object b. Object c. String d. none of the above
Lamport’s Bakery Algorithm does not require ________.
a) a large number of shared variables b) complicated loops c) that any operations occur atomically d) all of the above
Instant Messaging is one of the least common ways that malicious code is spread on the Internet.
Answer the following statement true (T) or false (F)
A(n) ____ is a computer used to host programs and data for a network.
A. mainframe computer B. super server C. midrange server D. Internet server