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
steposvetlana [31]
3 years ago
7

Use the code above to write a program that when run, draws 1000 points

Computers and Technology
2 answers:
kari74 [83]3 years ago
6 0

Answer: This is what worked for me

Explanation:

Blababa [14]3 years ago
5 0

Answer:

import simplegui

import random

def draw_handler(canvas):

for x in range(1000):

colorList = ["Yellow", "Red", "Purple", "White", "Green", "Blue", "Pink", "Orange"]

c = random.choice(colorList)

x = random.randint(1,600)

y = random.randint(1,600)

canvas.draw_point([x, y], c)

frame = simplegui.create_frame('Testing', 600, 600)

frame.set_canvas_background("Black")

frame.set_draw_handler(draw_handler)

frame.start()

Explanation:

The answer from the other person is not actually the answer to the question. The only reason it worked for him and gave it a 100% is because this particular lesson/code practice is purely a participation grade. You’ll automatically get a 100% just for attempting it, regardless of whether your answer is correct or not. This is the real answer, I used a for loop, setting my range to 1000 which is how you create exactly 1000 points. Next, I defined my color array, my x randint value, and my y randint value. I set both the x and y randint values to 1 - 600 since the frame is 600x600. The rest is pretty self explanatory.

You might be interested in
1000base-t is a standard for achieving throughputs ____ times faster than fast ethernet over copper cable.
meriva
An Average of 10 times faster.

Hope this helps!
3 0
3 years ago
You recently purchased a new laptop for home. You want to ensure that you are safe from malware. You should install a personal _
german

Answer:

You should install a personal firewall, a program that protects your computer from unauthorized access by blocking certain types of communications.

Explanation:

In computing, a firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. A firewall typically establishes a barrier between a trusted internal network and untrusted external network, such as the Internet.

8 0
4 years ago
Write a Java method onlyDigits that takes a string as a parameter. The method should remove from the string all characters, whic
Stels [109]

Answer:

public static String onlyDigits(String in){

    String digitsOnly = in.replaceAll("[^0-9]", "");

    return digitsOnly;

}

A Complete program is wrtten in the explanation section

Explanation:

public class TestClass {

   public static void main(String[] args) {

     String a = "-jaskdh2367sd.27askjdfh23";

       System.out.println(onlyDigits(a));

}

public static String onlyDigits(String in){

    String digitsOnly = in.replaceAll("[^0-9]", "");

    return digitsOnly;

}

}

The output: 23672723

The main logic here is using the Java replaceAll method which returns a string after replacing all the sequence of characters that match its argument, regex with an empty string

3 0
3 years ago
I'll pay 50 dollars to anyone who can do this leave your snap after answering doing it and ill cash app it
gladu [14]

Well for must cases it is the Ram of the system and the processor I will show you how you can get rid of slow processing

  1. Run the task manager then try to stop some running programs
  2. the antivirus sometimes slows the computer due to the processing power it takes.
  3. I would recommend that all program should be closed from the task manager and close some running apps in the system settings go to start up and then close it now you are good to go.

5 0
3 years ago
VW discovered that its engineers had developed a software program that allowed some of its car models to run without emissions c
den301095 [7]

Answer:

d. ​Blanchard/Peale model

Explanation:

In order to conduct proper emission test, it is essential to follow the three steps proposed by Blanchard and Peale. Their proposition can be used to answer the necessary ethical questions and proffer solutions. Therefore, the company should have conducted an ethical check to resolve the ethical issue. The correct answer is option d.

4 0
3 years ago
Read 2 more answers
Other questions:
  • A computer professional who has access to sensitive information shares this information with a third party. Which professional c
    9·2 answers
  • What does it mean for a design to be content driven
    12·1 answer
  • Steven, Marcos, and Juan are having a free-throw shooting contest. Each boy
    9·1 answer
  • The private field, which is known as the property‘s __________, holds any data that is assigned to the property.a. private datab.
    9·1 answer
  • Small data files that are deposited on a user's hard disk when they visit a website are called _______.
    6·2 answers
  • An example of hardware is a(n) _____.
    9·2 answers
  • Which game would be classified as an advergame?
    6·2 answers
  • And this help me please as well. ​
    12·1 answer
  • Which is the most correct option regarding subnet masks?
    10·1 answer
  • I NEED THIS DONE NOW ASAP, PLS HELP ME
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!