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 important feature was introduced alongside The Fisherman?​
Bad White [126]

Duplicate? brainly.com/question/13086598

5 0
3 years ago
Read 2 more answers
What is a different paragph formatting tools
soldi70 [24.7K]
You can have paragraph alignment which is left, right, and center
5 0
3 years ago
How do you take a picture on this app
damaskus [11]
The paper clip.

Hope this helped.

Can i have brainliest?
8 0
3 years ago
Suppose we can buy a chocolate bar from the vending machine for $1 each. Inside every chocolate bar is a coupon. We can redeem s
Tanya [424]

Answer and Explanation:

Using JavaScript:

/* program should take N input which represents the dollar amount and output how many chocolate bars and how many coupons we have*/

function chocolatebar(dollars){

var dollaramt= dollars;

var i;

for(i=0; i <= dollaramt; i++){

i=i+6

?

Alert ("you have 1 extra chocolate bar");

:

Alert ("keep buying chocolate bars to get more coupons for a bonus chocolate bar")

}

}

*

7 0
3 years ago
Choose the comparison operator that will create a true statement in Scratch
andrew11 [14]

Answer:

The second option

90 > 85

The statement above means 90 is more than 85 which is true.

7 0
2 years ago
Other questions:
  • Files and e-mail messages sent over the Internet are broken down into smaller pieces called _____.
    13·1 answer
  • Among the many DTP software tools available today, which is regarded as the industry standard for DTP?
    13·2 answers
  • True or false A ClassB fire involves live electrical equipment
    5·1 answer
  • A type of indent where the first line of text starts at the left margin and the second and succeeding lines of text are indented
    7·2 answers
  • A small company is requesting a quote to refresh its wireless network. The company currently runs 60 autonomous APs and has plan
    13·1 answer
  • What is one of the differences between Random Access Memory (RAM) and Read Only Memory (ROM)? RAM is where files are stored, and
    6·2 answers
  • When network cards are communicating, bits can occasionally be corrupted in transmission?
    5·1 answer
  • A friend complains that she is always running out of money even though she “never buys anything expensive.” What advice would yo
    5·2 answers
  • An organization's Finance Director is convinced special malware is responsible for targeting and infecting the finance departmen
    13·1 answer
  • Employees in your organization regularly need to print sensitive documents. The employees properly dispose of the hard copies of
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!