Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

challenge activity 3.3.1: tuple basics. jump to level 1 four values are…

Question

challenge activity 3.3.1: tuple basics. jump to level 1 four values are read from input and are stored into variables color_name, red_channel, green_channel, and blue_channel. initialize a tuple named color_info to store color_name, red_channel, green_channel, and blue_channel, in that order. click here for example 1 color_name = input() 2 red_channel = int(input()) 3 green_channel = int(input()) 4 blue_channel = int(input()) 5 6 \\\ your code goes here \\\ 7 8 print(f\color name: {color_info0}, r: {color_info1}, g: {color_info2}, b: {color_info3}\) check next level how was this section? provide section feedback feedback?

Explanation:

Step1: Create the color tuple

$color\_info = (color\_name, red\_channel, green\_channel, blue\_channel)$

Answer:

color_name = input()
red_channel = int(input())
green_channel = int(input())
blue_channel = int(input())

# Your code goes here
color_info = (color_name, red_channel, green_channel, blue_channel)

print(f"Color name: {color_info[0]}, R: {color_info[1]}, G: {color_info[2]}, B: {color_info[3]}")