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
A user from the accounting department has contacted you regarding problems with a dot matrix printer. When you examine the outpu
Mama L [17]

Answer:

Replace the printhead is the correct answer.

Explanation:

Because in the following statement, that person is from the department of the accounting then, he call the technician regarding the problem occurs in the printer which is dot-matrix printer and when he examined the dot-matrix printer and replace the printhead because when he print any document then, he finds that some letters have missing from the page.

5 0
3 years ago
New evidence can lead to a change in scientific knowledge.<br><br> A. True<br> B.False
lidiya [134]

ιт ιѕ (α.) тяυє ιf уσυ fιи∂ иєω киσωℓєgє σи ∂σмєтнιиg ιт ¢αи ¢нαиgє ѕ¢ιєи¢є

ℓιкє нσω тнєу υѕє∂ тσ вєℓινє тнє єαятн ωαѕ fℓαт,σя нσω тнє єαятн ωαѕ тнє ¢єитєя σf тнє υиινєяѕє

нσρє ι ¢συℓ∂ нєℓρ уσυ!!!!!!!!

3 0
3 years ago
Read 2 more answers
WILL GIVE BRAINLIEST AND 30 POINTS!! NEED ASAP!!!!
kotykmax [81]

Answer:

Explanation:

1. In tabletop games and video games, game mechanics are the rules that guide the player's moves or actions, as well as the game's response to them.

5.User interface is about the visual design and the information designs around the screens while the User Experience is about the whole experience and not only about the screen. User interface is mainly focused on the product while User experience on the other hand mostly focuses on the user and their journey through the product.

5 0
3 years ago
An array is said to be dual if it has an even number of elements and each pair of consecutive elements sum to the same value. Re
Debora [2.8K]

Answer:

def is_dual( array):

   if len(array) % 2 == 0:

       count = 0

       for i in range(0, len(array)//2, 2):

           if array[i] + array[i+1] == array[0] + array[1]:

               count += 1

       if count == len(array)//2:

           return True

       else:

           return False

Explanation:

The python program defines a function called is_dual that accepts an array parameter and check if the array is dual. If it meets the condition, the function returns true but returns false when the array is not dual.

7 0
3 years ago
When an array is passed to a function, it is actually ________ the array that is/are passed?
MAVERICK [17]
Hello <span>MrSnuffleBuns4243 
</span>

Answer: When an array is passed to a function, it is actually  <span>the starting memory address of </span>the array that is/are passed?

Hope this helps
-Chris
5 0
3 years ago
Other questions:
  • Personal computer hard disk platters typically have storage capacities ranging from 40 gb to ____.
    8·1 answer
  • Comments can be hidden by clicking the _____ button.
    10·1 answer
  • Hilary works at Klothes Kloset. She quickly helps the customers, and her cash drawer is always correct at the end of her shift.
    9·1 answer
  • What is the output of the following program? #include using namespace std; class TestClass { public: TestClass(int x) { cout &lt
    5·1 answer
  • Users at UC need to be able to quickly create a Resource record from the Project record's Chatter feed How should the App Builde
    10·1 answer
  • Which statement uses the example type of context clue for the underlined word?
    5·2 answers
  • Whats the answer :)?<br>i will give brainslist​
    11·1 answer
  • Write a python program to print the following series 3..10..31..94......n​<br><br>Pls answer fast..
    11·1 answer
  • Table Setting in any occasion can add to the beauty and significance of the event. It may
    6·1 answer
  • Which of the following is NOT AN EXAMPLE of personal identifying
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!