Question: Import the namedtuple container from collections. Then, define a named tuple called Color with fields: name, R , G , and B , in that

Import the namedtuple container from collections. Then, define a named tuple called Color with fields: name, R, G, and B, in that order.y Click here for exampleEx: If the input is:sienna1608245then the output Is:Color name: sienna, R: 160, G: 82, B: 451 Color = namedtuple( Color', ['name'|'R','G','B'])2'** Your code goes here34 color name = input ()5 red channel = int(input ())6 green_channel = int(input ())7 blue channel = int (input ())89 color_info = Color (color_name, red_ channel, green_channel, blue_channel)1011 print (f'Color name: {color_info.name), R: {color_info.R}, G: {color_info.G}, B: {color_info.B}')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!