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
Which of the following is the last step in creating a budget?
sweet [91]
You answer to the question is C
3 0
3 years ago
12. Which of the following is CourseBit®? (1 point)
Annette [7]
<span>12. Which of the following is CourseBit®? 
</span><span>a leading Moodle™ development and hosting provider that focuses on highly customized systems
</span>
<span>13. In Blender®, which interface principle corresponds to the user interface that allows a user to view all options and tools at a glance with pushing or dragging editors around?
non-overlapping

Hope this helps.</span>
4 0
3 years ago
Which of the following may present a problem for Linux users?
motikmotik
Tendancy to crash hope that helped
6 0
4 years ago
Read 2 more answers
I need Help Right now!!!!!!!!!!!!!!!!!!!!!!!!!
Vikki [24]
Analog<span> and </span>digital<span> signals are used to transmit information, usually through electric signals. In both these technologies, the information, such as any audio or video, is transformed into electric signals. The </span>difference between analog and digital<span> technologies is that in analog technology, information is translated into electric pulses of varying amplitude. In digital technology, translation of information is into binary format (zero or one) where each bit is representative of two distinct amplitudes. analog vs digital</span>
5 0
4 years ago
Which of the following is a principle that can improve the efficiency of I/O?
natulia [17]

Answer:

C)

Explanation:

One principle that can improve the efficiency of I/O would be to move processing primitives into hardware. Primitives are a semantic value representing something else such as words or numbers within the programming language. By moving them into hardware they system is able to read them at a much faster speed making the I/O more efficient.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Worms often try to disguise from where they are sending data by using a bogus ip addresses instead of using an authorized ip add
    11·1 answer
  • What is it called when someone attempts to befriend you online for the purpose of stealing confidential or sensitive information
    10·1 answer
  • Emilio is reviewing the data he collected from historical records about immigration in the united states. He decides to create a
    5·1 answer
  • A Gym Masters system programmer has just installed the first Windows Server 2016 sys- tem and now needs to do an initial configu
    13·1 answer
  • Whoever answers int the next 15 minutes will get brainliest. To get brainliest, it also has to be the correct answer. 8 points r
    11·2 answers
  • A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: The name of the clie
    8·1 answer
  • Write a MASM program to calculate Fibonacci numbers:
    10·1 answer
  • Obtaining the data of a video file from a flash drive is an example of a(n) _________ operation.
    6·1 answer
  • Whenever I rate an answer to a question, it says so and so finds it helpful. It's always the same people that they say find it h
    10·1 answer
  • Is computing gcse easy or hard
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!