Write a general “red-ify” function. Write a function that accepts a picture as input, then doubles the red value of every pixel and cut the blue and green values in half.

What will be an ideal response?


```
def redify(picture):
for pix in getPixels(picture):
valueB = getBlue(pix)/2
valueR = getRed(pix)*2
valueG = getGreen(pix)/2
setColor(pix,makeColor(valueR,valueG,valueB))
```

Computer Science & Information Technology

You might also like to view...

What is the escape sequence for double quote?

A. /” B. \” C. \’ D. /’

Computer Science & Information Technology

Write an app that tests whether the examples of the Math class actually produce the indicated results.

``` // Solution: MathTest.cs // Testing the Math class methods. using System; class MathTest { static void Main() { Console.WriteLine($"Math.Abs(23.7) = {Math.Abs(23.7)}"); Console.WriteLine($"Math.Abs(0.0) = {Math.Abs(0.0)}"); Console.WriteLine($"Math.Abs(-23.7) = {Math.Abs(-23.7)}"); Console.WriteLine($"Math.Ceiling(9.2) = {Math.Ceiling(9.2)}"); Console.WriteLine($"Math.Ceiling(-9.8) = {Math.Ceiling(-9.8)}"); Console.WriteLine($"Math.Cos(0.0) = {Math.Cos(0.0)}"); Console.WriteLine($"Math.Exp(1.0) = {Math.Exp(1.0)}"); Console.WriteLine($"Math.Exp(2.0) = {Math.Exp(2.0)}"); Console.WriteLine($"Math.Floor(9.2) = {Math.Floor(9.2)}"); Console.WriteLine($"Math.Floor(-9.8) = {Math.Floor(-9.8)}"); Console.WriteLine($"Math.Log(Math.E) = {Math.Log(Math.E)}"); Console.WriteLine($"Math.Log(Math.E * Math.E) = {Math.Log(Math.E * Math.E)}"); Console.WriteLine($"Math.Max(2.3, 12.7) = {Math.Max(2.3, 12.7)}"); Console.WriteLine($"Math.Max(-2.3, -12.7) = {Math.Max(-2.3, -12.7)}"); Console.WriteLine($"Math.Min(2.3, 12.7) = {Math.Min(2.3, 12.7)}"); Console.WriteLine($"Math.Min(-2.3, -12.7) = {Math.Min(-2.3, -12.7)}"); Console.WriteLine($"Math.Pow(2.0, 7.0) = {Math.Pow(2.0, 7.0)}"); Console.WriteLine($"Math.Pow(9.0, 0.5) = {Math.Pow(9.0, 0.5)}"); Console.WriteLine($"Math.Sin(0.0) = {Math.Sin(0.0)}"); Console.WriteLine($"Math.Sqrt(900.0) = {Math.Sqrt(900.0)}"); Console.WriteLine($"Math.Tan(0.0) = {Math.Tan(0.0)}"); } } ```

Computer Science & Information Technology

The heading lines of a memo are bold.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Match each item with an statement below:

A. UNIX-based command interface and protocol for securely accessing a remote computer. B. can provide intelligent traffic and bandwidth management based on the content of a session and not just on network connections. C. encrypts both the header and the data portion. D. "plain" HTTP sent over SSL/TLS. E. the end of the tunnel between VPN devices. F. handles setting up the connection with the remote VPN server and takes care of the special data handling required to send and receive data through the VPN tunnel. G. most widely deployed tunneling protocol. H. encrypts all files or selected directories and files on a Linux system. I. one of the ways to reduce the risk of FTP attack.

Computer Science & Information Technology