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
What is the data rate of a DS0 signal?
djyliett [7]

Answer: 64 Kbps

Explanation:

3 0
3 years ago
Define Based Assessment ​
Oduvanchick [21]

Explanation:

In an educational setting, standards-based assessment is assessment that relies on the evaluation of student understanding with respect to agreed-upon standards, also known as "outcomes". The standards set the criteria for the successful demonstration of the understanding of a concept or skill -WIKIPEDIA

8 0
3 years ago
A keyboard, mouse, and microphone are examples of ________.
kykrilka [37]

Answer:

A keyboard, mouse, and microphone all are examples of <u>peripheral devices.</u>

Explanation:

hope this helps

5 0
2 years ago
Read 2 more answers
which consumable would be used with a 3d printer? group of answer choices filament print ribbon toner cartridge ink
Anna35 [415]

Answer:

Filament

Explanation:

Filament is the plastics that 3d printers use to make objects.

7 0
2 years ago
Which of these is an example of an input?
boyakko [2]

Answer:

typing on a key board

this is the best Ans.

8 0
3 years ago
Other questions:
  • Disk scheduling algorithms in operating systems consider only seek distances, because Select one: a. modern disks do not disclos
    13·1 answer
  • A circuit has a resistance of 300 ohm and a current of 0.024 A. What is the voltage in the circuit?
    12·1 answer
  • What are the advantages and disadvantages of the simulated link strategy?
    11·1 answer
  • Fill in the blank. Do not abbreviate.
    6·1 answer
  • True or false: a cover letter accompanies a resume to showcase a job-seeker’s personal life
    6·2 answers
  • 7. When using find command in word we can search?
    7·1 answer
  • What development in operating systems happened between the years 1990 and 2000?
    15·1 answer
  • You are given the task of reading in n numbers and then printing them out in sorted order. Suppose you have access to a balanced
    12·1 answer
  • Explain ONE negative outcomes of not matching an ICT product to the correct audience:
    15·1 answer
  • 2) A ________ uses electronic memory and has no motors or moving parts. A) mechanical hard drive B) solid-state drive C) Blu-ray
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!