Write a program checkLuminance that will input red, green, and blue values, and compute the luminance using the weighted average (as below). But then print out a warning to the user based on the computed luminance:

• If the luminance is less than10, “That’s going to be awfully dark.”
• If the luminance is between 50 and 200, “Looks like a good range.”
• Over 250, “That’s going to be nearly white!”

```
def checkLuminance(redValue, greenValue, blueValue): luminance = (redValue+greenValue+blueValue)/3
if luminance <10:
print "That's going to be awfully dark."
if (luminance >50) and (luminance<200):
print "Looks like a good range."
if luminance>250:
print "That's going to be nearly white!"
```

Computer Science & Information Technology

You might also like to view...

A record is made up of related data that displays in one column in a database table

Indicate whether the statement is true or false.

Computer Science & Information Technology

Which of the following is a rule of referential integrity??

A. ?A record can be added to a related table even if a matching record exists in the primary table. B. ?The value of the primary key in the primary table cannot be changed if matching records exist in a related table. C. ?A record in the primary table can be deleted if matching records exist in the related table. D. ?The Cascade Delete Related Records option cannot be used to delete records in the primary table as well as in a related table.

Computer Science & Information Technology