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
Marina CMI [18]
3 years ago
12

Write a program that will draw a red circle on top of a blue square in the center of the canvas. The blue square should have sid

es of 100 pixels each and the red circle should have a diameter of 100 pixels
it's thru codehs and it's due tomorrow so
Computers and Technology
1 answer:
MakcuM [25]3 years ago
3 0

Answer:

Explanation:

The following code is written in Python. It uses the imports the turtle class in order to be able to draw a blue square with 100pixels per side and then a red circle with a diameter of 100 pixels that fits perfectly inside the square.

import turtle

t = turtle.Turtle()

#Make Square

t.fillcolor('blue')

t.begin_fill()

t.back(50)

for i in range(4):

 t.forward(100)

 t.left(90)

t.end_fill()

#Make Circle

t.forward(50)

t.fillcolor('red')

t.begin_fill()

t.circle(50)

t.end_fill()

You might be interested in
The four smallest numbers (40 points) Write an ANNA assembly program (smallest_four.ac) that finds the four smallest numbers ent
kari74 [83]

Answer:

the answer is -25

Explanation:

6 0
3 years ago
What are invoices? A. Documents that convey a company's liabilities B. Documents that convey how much a company was earning and
grandymaker [24]
<span>C. Documents that convey buyers, sellers, and purchases made</span>
5 0
4 years ago
Read 2 more answers
Which of the following is a preferable method to secure wireless access in a SOHO?
NARA [144]
Use a Ghost program follow throught with 2hyttlg5:6\:56
6 0
3 years ago
2. Consider a 2 GHz processor where two important programs, A and B, take one second each to execute. Each program has a CPI of
allsm [11]

Answer:

program A runs in 1 sec in the original processor and 0.88 sec in the new processor.

So, the new processor out-perform the original processor on program A.

Program B runs in 1 sec in the original processor and 1.12 sec in the new processor.

So, the original processor is better then the new processor for program B.

Explanation:

Finding number of instructions in A and B using time taken by the original processor :

The clock speed of the original processor is 2 GHz.

which means each clock takes, 1/clockspeed

= 1 / 2GH = 0.5ns

Now, the CPI for this processor is 1.5 for both programs A and B. therefore each instruction takes 1.5 clock cycles.

Let's say there are n instructions in each program.

therefore time taken to execute n instructions

= n * CPI * cycletime = n * 1.5 * 0.5ns

from the question, each program takes 1 sec to execute in the original processor.

therefore

n * 1.5 * 0.5ns = 1sec

n = 1.3333 * 10^9

So, number of instructions in each program is 1.3333 * 10^9

the new processor :

The cycle time for the new processor is 0.6 ns.

Time taken by program A = time taken to execute n instructions

=  n * CPI * cycletime

= 1.3333 * 10^9 * 1.1 * 0.6ns

= 0.88 sec

Time taken by program B = time taken to execute n instructions

= n * CPI * cycletime

= 1.3333 * 10^9 * 1.4 * 0.6

= 1.12 sec

Now, program A runs in 1 sec in the original processor and 0.88 sec in the new processor.

So, the new processor out-perform the original processor on program A.

Program B runs in 1 sec in the original processor and 1.12 sec in the new processor.

So, the original processor is better then the new processor for program B.

5 0
3 years ago
Arpenet was the computer created by the military true or false
Sphinxa [80]

True. It was a project that the pentagon was working on in the 60's

3 0
3 years ago
Other questions:
  • Pendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author'
    14·1 answer
  • A network administrator issues the show vlan brief command while troubleshooting a user support ticket. What output will be disp
    15·2 answers
  • . Stress can affect not only your health, but also other aspectsof your
    15·1 answer
  • Write a program that displays in the title of the window the position of the mouse as the user moves the mouse around the window
    5·1 answer
  • Write a recursive method in pseudo code that returns the number of 1's in the binary representation of n. use the fact that this
    6·1 answer
  • Rutherford concluded from his calculations that the volume of an atom is filled with protons, neutrons and electrons. is mostly
    14·1 answer
  • Danica is creating a flyer for her cookies that she will sell during her school fair. She wants to add a registered
    7·1 answer
  • Define a function in Scheme (or relation in Prolog) that checks whether a set of elements (represented as a list) is a subset of
    10·1 answer
  • HOW TO DISCONNECT A MONITOR FROM A SYSTEM UNIT
    6·1 answer
  • The act of using computer equipment to “break into” the computer systems of others?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!