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
Colt1911 [192]
3 years ago
14

Can someone please help me with 6.8 Code Practice adhesive.

Computers and Technology
2 answers:
Ivahew [28]3 years ago
8 0

Answer:

I'm looking for this one too

Rashid [163]3 years ago
7 0

Answer:

import simplegui

import random

# global constants

WIDTH = 600

HEIGHT = 400

PARTICLE_RADIUS = 5

COLOR_LIST = ["Red", "Green", "Blue", "White"]

DIRECTION_LIST = [[1,0], [0, 1], [-1, 0], [0, -1]]

# definition of Particle class

class Particle:

  # initializer for particles

  def __init__(self, position, color):

      self.position = position

      self.color = color

  # method that updates position of a particle    

  def move(self, offset):

      self.position[0] += offset[0]

      self.position[1] += offset[1]

  # draw method for particles

  def draw(self, canvas):

      canvas.draw_circle(self.position, PARTICLE_RADIUS, 1, self.color, self.color)

  # string method for particles

  def __str__(self):

      return "Particle with position = " + str(self.position) + " and color = " + self.color

# draw handler

def draw(canvas):

  for p in particle_list:

      p.move(random.choice(DIRECTION_LIST))

  for p in particle_list:

      p.draw(canvas)

# create frame and register draw handler

frame = simplegui.create_frame("Particle simulator", WIDTH, HEIGHT)

frame.set_draw_handler(draw)

# create a list of particles

particle_list = []

for i in range(100):

  p = Particle([WIDTH / 2, HEIGHT / 2], random.choice(COLOR_LIST))

  particle_list.append(p)

# start frame

frame.start()

Explanation:

this worked for me, sorry if its to late. let me know if anything is wrong

You might be interested in
Write an IF statement involving a Boolean operator (AND, OR or
vova2212 [387]

Answer:

i need a friend , ...............r u up?

6 0
1 year ago
Margaret O'Connor is an upcoming poet from Georgia who recently updated her blog with her piece of writing titled, Shadows. One
fenix001 [56]

Answer:

The answer is "option D"

Explanation:

Plagiarism is the way of stealing some other person's ideas or words and using them as their work. It is divided into four parts that are Direct Plagiarism, Self Plagiarism, Mosaic Plagiarism, and Accidental Plagiarism. In the given question other options are not correct that can be described as:

  • In option A, It is software that is used to provide someone else's identity.
  • In option B, It refers to white-collar crime, in which the property transfer to he or she are misallocated by a person or entity.
  • In option C, It is a method that is used to increase the speed of a computer by using high-speed RAM.  

3 0
3 years ago
What is access 2016?
Goryan [66]

Access 2016 is what it is

4 0
4 years ago
Consider a memory-management system based on paging. The total size of the physical memory is 2 GB, laid out over pages of size
Sliva [168]

Answer:

A. 31 bits

B. 13 bits, 18 bits

C. 256k

Explanation:

A.

We have total size of physical memory as 2gb

This means that 2¹ x 2³⁰

Using the law of indices,

= 2³¹

So physical address is equal to 31 bits

B.

We get page size = 8kb = 2³

1 kb = 2¹⁰

2³ * 2¹⁰ = 2¹³

So page replacement = 13 bits

Page frame number

= physical address - replacement bits

= 31 - 13

= 18 bits

C.

The number of frames is given as

2¹⁸ = 2⁸ x 2¹⁰ = 256K

So number of frames = 256K

D

Logical add space is 256K

Page size= physical pages = 8kb

Logical address layout= 28biys

Page number = 15 bits

Displacement = 12 bits

256k/8k = 32 pages in address space process

4 0
3 years ago
Keira is creating an app for her cross-country team. Users will input their race times and the output will be a graph showing th
MArishka [77]

Answer:

D. Turtle Graphics

Explanation: In computer graphics, turtle graphics are vector graphics using a relative cursor upon a Cartesian plane. Turtle graphics is a key feature of the Logo programming language.

6 0
3 years ago
Other questions:
  • Whichof the following is not a standard method called as part of the JSPlife cycle?jspInit()jspService()_jspService()jspDestroy(
    12·1 answer
  • The ________ of the operating system enables users to communicate with the computer system. modem window network adapter card us
    14·1 answer
  • You have repaired a broken lcd panel in a notebook computer. however, when you disassembled the notebook, you bent the hinge on
    6·1 answer
  • ____ technology essentially takes the data to be transmitted and rather than transmitting it in a fixed bandwidth spreads it ove
    15·1 answer
  • What do these terms have in common? google, yahoo!, bing they are important books. they are internet search engines. they are wo
    10·1 answer
  • Examine the efficiency the various recovery algorithms used in deadlock handling
    10·1 answer
  • If a stop-and-wait protocol is used, what is the fraction of time, in seconds, that the sender is busy sending bits into the cha
    8·1 answer
  • Which of the following are true if you pay only the minimun amount each month towards your credit card bill? You will be charged
    11·1 answer
  • Directions: Asba student of Contact Center Service, you already have an experience using different computer programs. Try to rem
    8·2 answers
  • Which approach to bandwidth usage consumes all of the available frequencies on a medium to transmit data
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!