For this question, you will use two pairs of nested counter- controlled loops (i.e., FOR loops)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
For this question, you will use two pairs of nested counter- controlled loops (i.e., FOR loops) in order to draw a particular pattern of symbols onto a pygame window. Your program will need to create a square pygame window of dimensions 750 x 750, and it will need to update the display for the user and wait for exactly 5 seconds before terminating. Your program does NOT need to produce the gridlines or the row and column numbers. You can assume that you have been provided with the following functions: star (i, j, r, g, b) - which draws a star on the grid at row i, column j, using the colour (r, g, b) umbrella(i, j, r, g, b) - which draws an umbrella on the grid at row i, column j, using the colour (r, g, b) 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 1 N 1M ★ 16 With this question, I am attempting to assess... ◆ if you know how a colour can be represented using an ordered triple of three integers ◆ if you know how to nest looping control structures ◆ if you know how to configure range function arguments to yield specific behaviour ◆ if you can perform basic operations using pygame. 2 For this question, you will use two pairs of nested counter- controlled loops (i.e., FOR loops) in order to draw a particular pattern of symbols onto a pygame window. Your program will need to create a square pygame window of dimensions 750 x 750, and it will need to update the display for the user and wait for exactly 5 seconds before terminating. Your program does NOT need to produce the gridlines or the row and column numbers. You can assume that you have been provided with the following functions: star (i, j, r, g, b) - which draws a star on the grid at row i, column j, using the colour (r, g, b) umbrella(i, j, r, g, b) - which draws an umbrella on the grid at row i, column j, using the colour (r, g, b) 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 1 N 1M ★ 16 With this question, I am attempting to assess... ◆ if you know how a colour can be represented using an ordered triple of three integers ◆ if you know how to nest looping control structures ◆ if you know how to configure range function arguments to yield specific behaviour ◆ if you can perform basic operations using pygame. 2
Expert Answer:
Related Book For
Intermediate Accounting
ISBN: 978-1260481952
10th edition
Authors: J. David Spiceland, James Sepe, Mark Nelson, Wayne Thomas
Posted Date:
Students also viewed these programming questions
-
The following income statement items appeared on the adjusted trial balance of Schembri Manufacturing Corporation for the year ended December 31, 2024 ($ in thousands): sales revenue, $17,500; cost...
-
One of the benefits of using computers to solve problems is they can process data very quickly to help us discover important facts about the real world. In this part of the lab, we will be using...
-
IST 8100 Supplemental Cases Inside Microsoft During last fall's United Way campaign at Microsoft, two vice-presidents made a wager on whose division would generate the most contributions. The loser,...
-
Describe at least one method by which the organization can reduce change resistance?
-
The value of the acceleration of gravity at any latitude is given by g = 9.7087(1 + 0.0053 sin2 ) m/s2, where the effect of the rotation of tbhye earth as well as the fact that the earth is not...
-
Revise the algorithm of Figure 6.6 so that it performs an in-order enumeration, rather than preorder. Figure 6.6: class BinTree implements Iterable { BinTree left; BinTree right; T val; // other...
-
Jan Samson, CEO at CalleetaCO, sat staring at the now-empty boardroom. Her board of directors had reacted negatively to Jans growth proposals for expanding CalleetaCO globally, leaving Jan with a big...
-
Monsecours Corp., a public company incorporated on June 28, 2013, setup a single account for all of its intangible assets. The following summary discloses the debit entries that were recorded during...
-
A sphere slides along a friction-free inclined surface n. The sphere slides from a height of n for the speed of the sphere once it reaches the point2. (b) 4.0m. (a) Develop an expression What is...
-
Bartov Corporation reports the following beginning inventory and purchases for 2020: Bartov sells 600 of these units in 2020. Compute its cost of goods sold for 2020 and the ending inventory reported...
-
Suppose you own a successful food truck business in Portland, Oregon. After a few years of operation, you decide to expand your business to other cities in Oregon. In order to start a new business,...
-
1. What are some strategies or techniques you use to move through the different stages of the creative process? 2. In your experience, which stage of the creative process do you find to be the most...
-
A brand new machine is purchased at the beginning of the year for $620,000. Its useful life is estimated at 6 years with a salvage value estimated at $100,,000. Using the straight line method, how...
-
You have been approached by a local news reporter asking if it would be beneficial or not to have a mobile integrated health (MIH) or community paramedic (CP) program aimed at assisting the elderly...
-
What are some of the most common feelings that you have in your day-to-day experience at school? Where do you feel this feeling in your body? Where else have you felt this way?
-
Shelby's retirement fund has an accumulated amount of $55,000. If it has been earning interest at 2.13% compounded monthly for the past 25 years, calculate the size of the equal payments that she...
-
It becomes particularly urgent for a company to considerdiversification when there are opportunities to transfer a powerful and well-respected brandname to the products of other businesses and...
-
Suppose that the laptop of Prob. 2.16 is placed in an insulating briefcase with a fully charged battery, but it does not go into sleep mode, and the battery discharges as if the laptop were in use....
-
List and briefly describe the three categories of likelihood that a future event(s) will confirm the incurrence of the liability for a loss contingency.
-
Aquatic Equipment Corporation decided to switch from the LIFO method of costing inventories to the FIFO method at the beginning of 2021. The inventory as reported at the end of 2020 using LIFO would...
-
The Pastel Paint Company recently loaned $300,000 to KIX 96, a local radio station. The radio station signed a noninterest-bearing note requiring the $300,000 to be repaid in three years. As part of...
-
Which of Yellows statements regarding the factors affecting the selection of a trading strategy is correct? A. Statement 1 B. Statement 2 C. Statement 3 Robert Harding is a portfolio manager at...
-
To fill the remaining portion of the ABC order, Yellow is using: A. an arrival price trading strategy. B. a TWAP participation strategy. C. a VWAP participation strategy. Robert Harding is a...
-
Given the parameters for the benchmark given by Harding, Yellow should recommend a benchmark that is based on the: A. arrival price. B. time-weighted average price. C. volume-weighted average price....
Study smarter with the SolutionInn App