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...
Here is the first line of the copy constructor for PFArrayD. The identifier PFArrayD is the name of the class, but in the header it is used three times with different meaning each time. Give the meaning for each use:
PFArrayD::PFArrayD( const PFArrayD& pfaObject)
Describe how you should structure a vertical lookup table if you need to look up values in a range.
What will be an ideal response?