What does the following function do? By reading the program without running it, do you think that
Question:
What does the following function do? By reading the program without running it, do you think that the result of test9 will be lighter or darker than the result of test7?
Transcribed Image Text:
def test9 (picture): for p in getPixels(picture): getRed (p) * 2 getGreen (p) getBlue (p) * 2 makeColor(red, green, blue) red green 2 blue color setColor(p,color)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 71% (7 reviews)
test9 doubles the current co...View the full answer
Answered By
Ayush Mishra
I am a certified online tutor, with more than 3 years of experience in online tutoring. My tutoring subjects include: Physics, Mathematics and Mechanical engineering. I have also been awarded as best tutor for year 2019 in my previous organisation. Being a Mechanical Engineer, I love to tell the application of the concepts of science and mathematics in the real world. This help students to develop interest and makes learning fun and easy. This in turn, automatically improves their grades in the subject. I teach students to get prepared for college entry level exam. I also use to teach undergraduate students and guide them through their career aim.
5.00+
2+ Reviews
10+ Question Solved
Related Book For
Introduction To Computing And Programming In Python A Multimedia Approach
ISBN: 9780134025544
4th Edition
Authors: Mark J. Guzdial, Barbara Ericson
Question Posted:
Students also viewed these Computer science questions
-
What does the following function do? def testl (picture): for p in getPixels (picture): setRed (p, getRed (p) * 0.3)
-
What does the following function do? def test2 (picture): for p in getPixels(picture): setBlue (p, getBlue(p) * 1.5)
-
What does the following statement mean? If I want to assess the cash flow prospects for a company down the road, I look at the companys most recent statement of cash flows. An income statement...
-
A business student has $3,500 available from a summer job and has identified three potential stocks in which to invest. The cost per share and expected return over the next two years are given in the...
-
Reconsider Prob. 11-53. Using EES (or other) software, investigate the effect of the various refrigerants for compressor efficiencies of 80, 90, and 100 percent. Compare the performance of the...
-
A transportation engineering study requires the calculation of the total number of cars that pass through an intersection over a 24-h period. An individual visits the intersection at various times...
-
In each of the following situations, determine which type of the error (physical model, discretization, iteration, or programming) is most likely responsible for poor performance. In each case,...
-
Wolf Creek Golf Inc. was organized on July 1, 2014. Quarterly financial statements are prepared. The trial balance and adjusted trial balance on September 30 are shown here. Instructions (a)...
-
Tabucol Aggregates, Inc. plans to replace one of its machines with a new efficient one.The old machine has a net book value of $120,000 with remaining economic life of 4years. This old machine can be...
-
The trial balance of Mr. Rosiak Fashion Center, Ltd. contained the following accounts at November 30, the end of the company's fiscal year. Adjustment data: 1. Supplies on hand totaled £2,100....
-
Write a function to draw a simple face with eyes and a mouth. on a picture.
-
Its a little more trickier to write a function that draws a diagonal from lower-left to upper-right for a square picture. Note that the sum of the x and the y should be equal to the number of pixels...
-
A racing car travels with a constant tangential speed of 75.0 m/s around a circular track of radius 625m. Find (a) The magnitude of the cars total acceleration and (b) The direction of its total...
-
Marvel Parts, Incorporated, manufactures auto accessories. One of the company's products is a set of seat covers that can be adjusted to fit nearly any small car. The company uses a standard cost...
-
A one cubic foot sample of a borrow-source clay weighed 88 lbs. If the specific gravity of solids was measured as 2.70, and the clay was found to be 10 percent saturated, determine the water content...
-
Compute the missing amount in the accounting equation for each entity from the financial information presented: Assets Liabilities Equity Your Basket $ ? $ 28,000 46,000 Flowers and Gifts 85,000 ?...
-
Bunker makes two types of briefcases, fabric and leather. The company is currently using a traditional costing system with labor hours as the cost driver but is considering switching to an...
-
Calculate the requested measures in parts (A) through (F) for bond X, assuming that it pays interest semiannually: (A) (B) (C) (D) (E) (F) Bond X Coupon 9% Yield to maturity 8% Maturity (years) 5 Par...
-
What requirements must be satisfied in order to construct a confidence interval about a population mean?
-
What are current assets and current liabilities? How are they different from non-current assets and non-current liabilities?
-
Suppose the algorithms used to implement the operations at layer k is changed. How does this impact operations at layers k 1 and k + 1?
-
An image is 1600 1200 pixels with 3 bytes/pixel. Assume the image is uncompressed. How long does it take to transmit it over a 56-kbps modem channel? Over a 1-Mbps cable modem? Over a 10-Mbps...
-
Mobile phone network operators need to know where their subscribers mobile phones (hence their users) are located. Explain why this is bad for users. Now give reasons why this is good for users.
-
J. Barnes Cycle Company manufactures bicycles. The chart below could possibly be used to illustrate the cost of Total Cost $6,000 $5,000 $4,000 $3,000 $2,000 $1,000 Total Cost $0 100 200 300 400...
-
fflush(fp); fsync(fileno(fp));
-
Behavior analysts are responsible for (select all that apply) A. Establishing baseline data collection B. Always carrying out the treatment C. Upholding the highest ethical standards to avoid harming...
Study smarter with the SolutionInn App