1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Bogdan [553]
3 years ago
6

This graphics program should draw a caterpillar. A caterpillar has NUM_CIRCLES circles. Use a for loop to draw the caterpillar,

centered vertically in the screen. Every other circle is a different color. When i is even, the circle should be red. When i is odd, the circle should be green. Remember that 0 is an even number. Be sure that the caterpillar is still drawn across the whole canvas even if the value of NUM_CIRCLES is changed. (PYTHON, CODEHS 4.6.6 Caterpillar.)
Computers and Technology
1 answer:
bearhunter [10]3 years ago
7 0

Answer:

radius = (get_width() / NUM_CIRCLES / 2)

x = radius

for i in range(NUM_CIRCLES):

   circ = Circle(radius)

   if i % 2 == 0:

       circ.set_color(Color.red)

   else:

       circ.set_color(Color.green)

   circ.set_position(x, get_height() / 2)

   add(circ)

   current_spot = x

   x = current_spot + (radius * 2)

Explanation:

You might be interested in
What kind of battery does a dji spark have?
shutvik [7]
Lithium-Ion Battery. The same kind of battery found in smartphones, laptops, etc.
6 0
4 years ago
While Joe's wife Molly and daughter Sunny did not mind moving,his son Daniel was not too happy with the sudden change in their l
Ann [662]

It means your stupid look it up!!

6 0
3 years ago
To reload a picture taken with a digital camera means to copy the digital picture from the camera to your computer.
goldenfox [79]
The answer would be false.
7 0
3 years ago
Read 2 more answers
The _____ constraint assigns a value to an attribute when a new row is added to a table
bixtya [17]

The default constraint gives a value to an attribute when a new row is added to a table.

<h3>Is default a kind of constraint?</h3>

This is known to be a type of constraint that often apply a value to a column if an INSERT statement does not really give the value for the column.

Therefore, one can say that the default constraint gives a value to an attribute when a new row is added to a table.

Learn more about default constraint from

brainly.com/question/19130806

#SPJ12

5 0
2 years ago
What two statements about IPv6 addresses are true? This task contains the radio buttons and checkboxes for options. The shortcut
Oliga [24]

Answer:

A and C

Explanation:

Option A:

In IPv6 there is a rule to reduce an IPv6 address when there are two or more consecutive segments of zeros just one time. This rule says that you can change the consecutive zeros for “::”  

Here is an example

How to reduce the following IPv6 address?

ff02:0000:0000:0000:0000:0000:0000:d500

Ans: ff02::d500

Example 2:

2001:ed02:0000:0000:cf14:0000:0000:de95

Incorrect Answer -> 2001:ed02::cf14::de95  

Since the rule says that you can apply “::” just one time, you need to do it for a per of zero segments, so the correct answer is:

Correct Answer -> 2001:ed02::cf14:0:0:de95

Or

2001:ed02:0:0:cf14::de95

Option C:

Since in IPv6 there are 2^{128} available addresses which means 340.282.366.920.938.463.463.374.607.431.768.211.456 (too many addresses), there is no need of NAT solution, so each device can have its own IP address by the same interface to have access through the internet if needed. If not, you can block the access through internet by the firewall.

4 0
4 years ago
Other questions:
  • You can increase your efficiency by using your e-mail program's spell checker because it eliminates the need for you to proofrea
    11·1 answer
  • Assume that an int variable age has been declared and already given a value and assume that a char variable choice has been decl
    9·1 answer
  • Define a method printAll() for class PetData that prints output as follows with inputs "Fluffy", 5, and 4444. Hint: Make use of
    10·1 answer
  • How can an administrator force wireless clients to use a standard web browser to provide information, and require a user to agre
    10·1 answer
  • PPE that should be used by every technician include all of the following, EXCEPT
    6·2 answers
  • What short (two letters!) but powerful boolean operator can check whether or not one string can be found in another string?
    12·1 answer
  • A vehicle equipped with an electronically shifted transaxle stalls whenever slowing to a stop after being driven over 20 miles (
    15·1 answer
  • When do we use SAVE and SAVE AS in saving artwork in adobe illustrator?<br> PLEASE HELP ASAP
    11·1 answer
  • Sistema binario, realizar el pasaje de binario a decimal; 00110011 11101100 11100001 11001100 10010101 11001111 10000001 1000110
    14·1 answer
  • The current in a resistor is 5.0 A, and its power is 60 W. What is the voltage?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!