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
Mathematics and computer science share many concepts.
Nastasia [14]

Answer:

Recursion

Explanation:

7 0
3 years ago
Read 2 more answers
What is the size of the program counter for an avr that has a 1 kbyte rom capacity?
horsena [70]

Answer:

9 bits

Explanation:

 We all recognize 1 K bytes as =1024 bytes.  

And the storage medium used for program instructions are the non-volatile flash memories. The MCUs are always 8 bits, and a piece of the instructions revenues two or one 16-bit words. Besides we know program memory magnitude through the device name, and as an instance, the ATmega64x line emanates with 64KB of flash, and the ATmega32x line emanates with 32 KB. And there is nobody like off-chip program memory, and all of the codes that are being implemented by the AVR essentially be on the on-chip flash. However, this restraint is not ever applied to the AT94 FPSLIC AVR/FPGA chips. Also, you must know that AVR is a family of microcontrollers established by ATEL in 1996. It is a Harvard architecture type single-chip 8-bit RISC microcontroller. And it is supposed to be the first microcontroller which applied flash memory for storing the program They are heavily used in embedded systems.  

1k byte = 1024 bytes, However, if the program instruction takes 16 bits.  

And hence it only wishes 512.  

Here and now 512 = 10^9, and henceforth you necessitate 9 bits at minimum.  

excluding you can somehow paginate that (such as through one-bit pagination, you will be necessitating only 8 bits and so on.)  

Therefore the answer here = 9 bits.

5 0
4 years ago
Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line 3 inFile >> x >> y;
harina [27]

Answer:

The answer to this question is the option "a".

The statement for opening file can be given as:  

inFile.open("progdata.dat");

Explanation:

In the above statement, this statement is part of the c++ programming language. To open any file we use the following syntax that can be given as:

Syntax:

inFile.open(filename, mode);

In the above syntax inFile.open() is a function that opens the file. In this function, we pass two parameters that are filename, mode. Where filename is the name of the file which we want to open. In the filename, we write file names with the path of the file like(C:\Users\Public\Music\Sample Music\abc.dat) where (C:\Users\Public\Music\Sample Music) is the path of the file and (abc.dat) is a file name. In the mode parameter, it provides the mode in which we want to open a file. There are two types of read mode and write mode. The default mode is read mode.

3 0
3 years ago
Establishing responsibilities, planning to best support the organization, acquiring validity, ensuring performance, conformity w
RUDIKE [14]

Answer: B. ISO 38500

Explanation:

ISO 38500 is an international Standard specifically developed by the International Organization for Standardization to oversee corporate governance of Information Technology. It lays down principles to guide directors and leaders of organizations on how to comply with regulatory requirements in the use of Information Technology within the firm.

The framework consists of six guiding principles in the use of I.T and they include; establishing responsibilities, planning or strategizing on how best to support the organization, acquisition of validity, ensuring performance, conformity with rules and respect of the human factor or behavior.

It was derived from the Australian Standard for Corporate Governance of Information and Communication Technology - AS 8015 - 200.

8 0
3 years ago
If a menu item requires additional information from the user, the Windows standard is to place a(n) ____ at the end of the capti
elena-s [515]

Answer:

elipses

Explanation:

According to my research on information technology, I can say that based on the information provided within the question the windows standard in this situation would be to place an ellipses at the end of the caption. This is because in the English language an ellipses (...)  usually indicates an intentional omission of a word or sentence, which in computer science is used to give the user an indication that it requires further user input.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

4 0
4 years ago
Other questions:
  • A coworker asks your opinion about how to minimize ActiveX attacks while she browses the Internet using Internet Explorer. The c
    14·1 answer
  • Adele’s mother owns a Daycare and she wants to learn all about this business, to help her mom and own it one day. Which CTSO sho
    9·1 answer
  • Parts are described by partnum, color, and price. Parts can be subassemblies as well and this means that they contain other part
    12·1 answer
  • If you are working with a team of students on a class project and your team chooses to share content by uploading Word and Excel
    13·1 answer
  • You’re dying to see the flaming eyelashes in concert this summer what’s the best way to cop a few tickets
    6·1 answer
  • HELP AASAP BRAINLIEST JUST HELP
    13·1 answer
  • Write a Python program that prints all the numbers from 0 to 6 except 3
    8·1 answer
  • ## Inputs
    15·1 answer
  • Select the correct answer from each drop-down menu,
    9·1 answer
  • Write a summary on the video "Greatest Inventions w/Bill Nye".
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!