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
You created the following dictionary relationships = {'Jimmy':'brother', 'Carol':'sister'}. You then executed the following code
dybincka [34]

Answer:

This is because the key in relationships['jimmy'] is wrong. The first letter "j" should be uppercase. The key in the given dictionary is "Jimmy" and therefore a lowercase "j" will result in a KeyError exception. The key is case sensitive and therefore a minor mistake in a single letter either in lowercase or uppercase will cause the error. The correct usage of key to address the value should be relationships["Jimmy"].

3 0
3 years ago
In QBasic, create a number guessing challenge. Your program should generate a random number from 1-
Sergio039 [100]

Answer:

yes

Explanation:

6 0
2 years ago
When talking about the physical elements of the internet, the term redundancy refers to:?
Sphinxa [80]
It refers to the physical elements of the internet
6 0
3 years ago
Values that are sent into a function are called _________.<br><br> Program Output
Semmy [17]

Answer:

Argument

Explanation:

The function is the block of the statement which performs the special task.

when we define the function in the program then we have to call that function.

the syntax for defining the function:

type name(parameter_1, parameter_2,...){

    statement;

}

the syntax for calling the function:

name( argument_1, argument_2,...);

Meaning of parameter and argument

The argument is used to send the value into the function definition. this can be passed by value or pass by reference.

The parameter is used to receive the value send by calling function.

Therefore, the answer is the Argument.

5 0
3 years ago
If Nancy receives an encrypted message from Matthew, which key does she use to read it? Nancy’s private key Nancy’s public key M
Juliette [100K]

Answer:

Nancy's private key

Explanation:

She's receiving it.  That means Matthew used her public key to encrypt it.  She should decrypt it using her private key.  Watch this video for clarification :)

Watch The Internet: Encryption & Public Keys on the big video site which cannot be named on brainly :p

7 0
3 years ago
Other questions:
  • You have a Nano Server named Nano1. Which cmdlet should you use to identify whether the DNS Server role is installed on Nano1
    12·1 answer
  • HELP ASAP????? please
    5·2 answers
  • Which of the following should be considered when conducting an audience analysis ?
    13·2 answers
  • What was the first fully computer animated feature film?
    13·1 answer
  • When preparing a document flowchart, the names of organizational departments or job functions should appear in theA) column head
    6·1 answer
  • Among the eight unique features of​ e-commerce, which is related to the ability to interact with web technology​ everywhere?
    14·1 answer
  • Which technology will a business use to figure out who accessed confidential files on a company's computer system
    12·1 answer
  • For the sake of maximizing hardware utilization in a multicore system with a many to many threading model, the relationship of t
    12·1 answer
  • What does input allow a computer to do
    14·1 answer
  • What were the names of Henry VIII's six wives?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!