Question: In Python, colours can be represented in a number of ways: as the colour name (a string), as a hexadecimal number (stri preceded with #
In Python, colours can be represented in a number of ways: as the colour name (a string), as a hexadecimal number (stri preceded with # ) and as RGB values (a sequence of 3 integers in the range 0 to 255 inclusive, each representing one of (R)ed, (G)reen and (B)lue). Consider the following Python data structure, which contains data representing the name, hexadecimal value and RGB values of some colours: colours- [['black', '#000000', [0,0,0]], ('white','#FFFFFF. [255, 255,25511 ['red', '#FF0000', (255,0,0)), ['green ' , '#00FF00', [0,255,011, ['blue', '#0000FF', [0,0, 25511] Which of the descriptions below best describes the purpose of the following print statement? print (colours (11 t2) 1211 Prints the green RGB element of the colour black Prints the red RGB element of the colour 'white Prints the blue RGB element of the colour blue Prints the green RGB element of the colour red Prints the blue RGB clement of the colour white Prints the green RGB element of the colour white Prints the green RGB element of the colour green Prints the red RGB element of the colour 'red
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
