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...
-
The effect of five different ingredients (A, B, C, D, E) on the reaction time of a chemical process is being studied. Each batch of new material is only large enough to permit five runs to be made....
-
How do you classify the pumps?
-
First Printing has contracts with legal firms in San Francisco to copy their court documents. Daily demand is almost constant at 12,500 pages of documents. The lead time for paper delivery is...
-
What does the textbook, Introduction to Forensic Psychology recommend regarding a specialized degree in forensic psychology?
-
Youve just been hired onto ABC Company as the corporate controller. ABC Company is a manufacturing firm that specializes in making cedar roofing and siding shingles. The company currently has annual...
-
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...
-
Describe the cost formula for a strictly variable cost such as electrical power cost of $1.15 per machine hour (i.e., every hour the machinery is run, electrical power cost goes up by $1.15).
-
Do you think the OSHA and NIOSH occupational safety and health requirements generally make sense? Why or why not?
-
What actions would you take if you were the company representative accompanying an OSHA inspector who found a serious violation in your company? Explain your answer.
-
What are the net capital outflow and the trade balance? Explain how they are related.
-
Do you foresee a situation in which you would ever refuse to allow an OSHA inspector on your worksite? Why or why not?
-
SoftBank Groups stock is currently trading at a price of 9,249 per share. The company is considering the acquisition of Vodafone Japan, whose stock is currently trading at 2,200 per share. The...
-
Over a year's time, a person receives a biologically equivalent dose of 24 mrem (millirems) from cosmic rays, which consist primarily of high-energy protons bombarding earth's atmosphere from space....
-
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.
-
make a scenario for each of the following Gesture communication Facial expression communication Oral communication Written communication discuss briefly each scenario
-
Problem 7-30 Holding Period Yield (LO2) The YTM on a bond is the interest rate you earn on your investment if interest rates don't change. If you actually sell the bond before it matures, your...
-
According to theknot.com, online dating is the most common way people meet their spouses today. This claim was based on a survey of 1,400 randomly selected recently married couples, with 266...
Study smarter with the SolutionInn App