Answer:
Question1:
day = int(input("Enter in Numeric Today's day:"))
if (x == 15 or x == 30):
print("You have a payday today!")
if (x != 15 and x != 30):
print("Its is not certainly a payday today but dont feel bad.")
Question 2:
red = int(input("Enter the value for red: "))
green = int(input("Enter the value for green: "))
blue = int(input("Enter the value for blue: "))
if (red > 255 or red < 0):
print("The value of Red is not correct.")
if (green > 255 or green < 0):
print("The value of Green is not correct.")
if (blue > 255 or blue < 0):
print("The value of Blue is not correct.")
Explanation:
Please check the answer section.
rgb_scale = 255
cmyk_scale = 100
def rgb_to_cmyk(r,g,b):
if (r == 0) and (g == 0) and (b == 0):
return 0, 0, 0, cmyk_scale
# rgb [0,255] -> cmy [0,1]
c = 1 - r / float(rgb_scale)
m = 1 - g / float(rgb_scale)
y = 1 - b / float(rgb_scale)
min_cmy = min(c, m, y)
c = (c - min_cmy)
m = (m - min_cmy)
y = (y - min_cmy)
k = min_cmy
return c*cmyk_scale, m*cmyk_scale, y*cmyk_scale, k*cmyk_scale
def cmyk_to_rgb(c,m,y,k):
r = rgb_scale*(1.0-(c+k)/float(cmyk_scale))
g = rgb_scale*(1.0-(m+k)/float(cmyk_scale))
b = rgb_scale*(1.0-(y+k)/float(cmyk_scale))
return r,g,b
The answer would be true. They're notes, so you don't need it to be written perfectly.
Edit: How would this be incorrect? A study guide is a personal thing, and so are notes. So long as you understand the notes, they don't need to be written as perfectly as an essay would.
I think it A I feel like report is right for the answer