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: 75% (8 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...
-
Mr Steinhoff is a Chartered Accountant registered with SAICA. He works as an internal auditor at Dischem Ltd . Whilst undertaking his work on sales division at Dischem, he detects fictitious sales...
-
Describe the new-product development process used at X-1. What are the similarities and differences to the process described in Figure 103?
-
1. What temporary situations, or changes in life circumstances, might influence a consumer to recognize a need for a cleaning product, in general, or a green cleaner, in particular? How might a...
-
You find that the going rate for a home mortgage with a term of 30 years is 6.5% APR. The lending agency says that based on your income, your monthly payment can be at most $740. How much can you...
-
Estimate the sfg of the substance in Problem 12-25E at 15oF. Problem 12-25E 0.5-lbm of a saturated vapor is converted to a saturated liquid by being cooled in a weighted piston- cylinder device...
-
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...
-
The capacities (in L) of two oil-storage tanks are x and y. The tanks are initially full; 1200 L is removed from them by taking 10% of the contents of the first tank and 40% of the contents of the...
-
How could civil engineers contribute to space debris management and cleanup?
-
In what ways can the principles of resilient infrastructure be applied to design urban systems capable of withstanding natural disasters, and how do these principles contribute to the overall safety...
-
What are local variables and global variables in Python?
-
When to use a tuple vs list vs dictionary in Python? Explain some benefits of Python
-
What is Lambda Functions in Python? How do I modify a string in python?
-
Which three industries would be most affected by a rise in the cost of raw materials? The following technology matrix describes the relationship of certain industries within the economy to each...
-
On January 1, 2018, Khalid Ltd., which follows IAS 17, entered into an eight-year lease agreement for three dryers. Annual lease payments for the equipment are $28,500 at the beginning of each lease...
-
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.
-
Los datos de la columna C tienen caracteres no imprimibles antes y despus de los datos contenidos en cada celda. En la celda G2, ingrese una frmula para eliminar cualquier carcter no imprimible de la...
-
Explain impacts of changing FIFO method to weighted average method in inventory cost valuations? Explain impacts of changing Weighted average method to FIFO method in inventory cost valuations?...
-
A perpetuity makes payments starting five years from today. The first payment is 1000 and each payment thereafter increases by k (in %) (which is less than the effective annual interest rate) per...
Study smarter with the SolutionInn App