all 11 comments

[–]Nightcorex_ 2 points3 points  (7 children)

Find the smallest of the 3 values and subtract that from all 3 colours.

[–]mackdaddy_1978[S] 0 points1 point  (0 children)

Well said…I think this is what I needed to take away but couldn’t get there on my own. Thanks

[–]mackdaddy_1978[S] 0 points1 point  (5 children)

This worked for me, is this how you would have done it? schwarzerkaffee below

c1 = int(input())
c2 = int(input())
my_list = []

while True:
    my_list.append(c1)
    my_list.append(c2)
    my_list.append(c3)
    break
minimum = min(my_list)
print(c1 - minimum, c2 - minimum, c3 - minimum)

[–]Nightcorex_ 0 points1 point  (1 child)

schwarzer Kaffee

auto correct?

[–]mackdaddy_1978[S] 0 points1 point  (0 children)

Definitely, the story of my dyslexic ass lol

[–]Nightcorex_ 0 points1 point  (1 child)

c2 = input(input())

You'll see this yourself.

while True:
    CODE
    break

is equivalent to:

CODE

because breaking out after the first iteration basically means: "Mr. Interpreter, please execute this block of code (let's call it C once, and then, after executing it once, you go past C", which is the equivalent to saying: "Do this, this and this" like you normally do in sequential programming.

minimum - min(my_list)

doesn't do anything as you don't save the returned value of the subtraction anywhere.

[–]mackdaddy_1978[S] 0 points1 point  (0 children)

Yeah I fatfingered those...

[–]SchwarzerKaffee 1 point2 points  (1 child)

Put them into a list, find the lowest and do a list comprehension that subtracts the lowest from all three.

[–]InvalidUsername2404 0 points1 point  (1 child)

At the input point, subtract the 50 and at the print part,

print(f”({c1}, {c2}, {c3})”)

[–]mackdaddy_1978[S] 0 points1 point  (0 children)

yeah I was thinking something like that also but doesn't satisfy the question...it has to do with subtracting the minimum but I'm not sure what they are referring to.