Question: Define a user-defined function, called mix_colours, by dragging and dropping the correct options into their corresponding places. The function should take in a string argument,

 Define a user-defined function, called mix_colours, by dragging and dropping the

Define a user-defined function, called mix_colours, by dragging and dropping the correct options into their corresponding places. The function should take in a string argument, representing a colour, and determine the result of 'mixing' red and the given colour. At the end of the function call, the resulting colour is returned as a string. Here is the mixing chart: - red + blue = purple - red + yellow = orange - red + green = brown For example calling mix_colour ('blue') should return 'purple'. The program begins here: result = ' ' result = 'purple' elif colour == 'green' : result = 'brown

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!