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]
2 years ago
14

Can someone please help me with 6.8 Code Practice adhesive.

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

Answer:

I'm looking for this one too

Rashid [163]2 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
Pls awnser if awnser is wrong I will unmark brainliest
choli [55]

Answer: i think 1, 3, and 4

Explanation:

3 0
2 years ago
True or false: all blockchains are programmed to have the same block time (confirmation time) as each other.
wariber [46]

Answer:

False

Explanation:

<em>The complexity of the hash, which is the hexadecimal number produced by the hashing process, determines the precise length of time required for block production. Thus, block times won't always be the same.</em>

4 0
1 year ago
Al these are benefits of computer literacy except
Harrizon [31]

Explanation:

  • Being computer literate supports entrepreneurship. ...
  • Communication. ...
  • Enhance your employment opportunities. ...
  • Address the gap in your knowledge. ...
  • Computers Reconstruct Business
8 0
2 years ago
If you insert a picture, resize and reposition it, and then change to a different picture, you must modify the new picture to
Mashcka [7]

Answer:

false , that is not true

Explanation:

because a person can change to a different picture , but it Is not by force it will have a match to the original

3 0
1 year ago
Read 2 more answers
Which of the following is a good question to ask during an informational interview?
grin007 [14]
How do you know your information is valid?
8 0
3 years ago
Read 2 more answers
Other questions:
  • A video streaming website uses 32 bit integers to count the number of times each video is played. In anticipation of some videos
    14·2 answers
  • Which does an icon on the desktop signify?
    12·1 answer
  • What is a orogram to block access to websites
    15·1 answer
  • Two of the major sources used today for obtaining information to create computer maps are satellites and _____________.
    11·2 answers
  • Alan has introduced a new line of scooters on his website and is using a Google Display Ad campaign to promote them. He selects
    8·1 answer
  • What happens when a string doesn’t include the separator that’s specified in the parameter of the split() method?
    13·1 answer
  • Very Short Answer Type Question (any 9)
    12·1 answer
  • Tạo thủ tục có tên _Pro04 để trả về số lượng tổng thời gian tham gia dự án Y của nhân viên có mã số X, với X là tham số đầu vào,
    5·1 answer
  • Complete the sentence with the correct response.
    12·1 answer
  • What was that show where lowe’s were based off eye colors and the main character had orange eyes that let her mind control peopl
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!