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
snow_tiger [21]
2 years ago
7

You should see the following code in your programming

Computers and Technology
1 answer:
Karo-lina-s [1.5K]2 years ago
4 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:

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
Anyone help me with number 41.
Katarina [22]
It is te = t I yhink
8 0
3 years ago
Laptop computers, personal digital assistants, and cellular phones were all readily accepted and diffused in U.S. markets where
astra-53 [7]

Answer: Compatibility

Explanation:

 According to the question, the given products are offering compatibility with the customers needs and the priorities of the consumers. The customers comparability means the degree of the product that fit between customers expectation and the capability of serving by the operation team.

The customers expectation mainly reflected both the present and the past evaluation of the products and the user experience. The compatibility of the customers needs is to meet the quality, value  and the service of the product.

8 0
3 years ago
Write a function wordcount() that takes the name of a text file as input and prints the number of occurrences of every word in t
artcher [175]

Answer:

Explanation:

The following Python program uses a combination of dictionary, list, regex, and loops to accomplish what was requested. The function takes a file name as input, reads the file, and saves the individual words in a list. Then it loops through the list, adding each word into a dictionary with the number of times it appears. If the word is already in the dictionary it adds 1 to its count value. The program was tested with a file named great_expectations.txt and the output can be seen below.

import re

def wordCount(fileName):

   file = open(fileName, 'r')

   wordList = file.read().lower()

   wordList = re.split('\s', wordList)

   wordDict = {}

   for word in wordList:

       if word in wordDict:

           wordDict[word] = wordDict.get(word) + 1

       else:

           wordDict[word] = 1

   print(wordDict)

wordCount('great_expectations.txt')

4 0
3 years ago
When implementing best practices, you will use external standalone firewalls whenever possible, but you won't go without a built
Andrews [41]
The answer is true

Technically, we have two types of firewall, a one way firewall and a two way. A one-way firewall will protect you from incoming threats. A two-way built-in or standalone firewall will add another layer of protection and thus, it is a must have tool.


8 0
2 years ago
1. Data in a smart card can be erased
Ostrovityanka [42]

Answer:

false

true

false

true

true

5 0
3 years ago
Read 2 more answers
Other questions:
  • Why is there more content on youtube in 4k then there is on cable, satellite, and digital tv combined?
    6·2 answers
  • Which of the following describe a required
    7·1 answer
  • From the television industry's point of view, which of the following would be the most desirable viewer?
    5·1 answer
  • 25 Points Discuss games you have played that have poor game design puzzles and how you might improve them.
    10·1 answer
  • If given the chance to own manage a business,what will be the name of the business?
    11·2 answers
  • What is the easiest way to create a resume in Word with predefined content that can be replaced with your information?
    13·2 answers
  • Which of the following languages does not provide built-in-pattern matching operations (the language, although, has pattern matc
    14·1 answer
  • Differentiate between system software and application software
    13·2 answers
  • Which of the following would be least effective?
    10·1 answer
  • Scientist Galileo Galilei used the
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!