tchloe448
05.12.2019 •
Computers and Technology
How to write a program to draw 1000 random points on a frame in python language for coding?
Solved
Show answers
More tips
- F Food and Cooking Discovering the Benefits of Kiwi: From Its Nutritious Properties to Its Unusual Benefits...
- S Style and Beauty Discover the Art of Nail Design: How Do You Paint Your Nails?...
- P Philosophy How to Develop Extrasensory Abilities?...
- O Other Everything You Need to Know About Kudyabliks...
- C Computers and Internet The Twitter Phenomenon: What it is and How to Use it...
- C Computers and Internet How to Choose a Laptop: Expert Guide and Tips...
- C Computers and Internet How to Choose a Monitor?...
- H Horoscopes, Magic, Divination Where Did Tarot Cards Come From?...
- S Style and Beauty How to Make Your Lips Fuller? Ideas and Tips for Beautiful Lips...
- C Computers and Internet How to Learn to Type Fast?...
Answers on questions: Computers and Technology
- M Mathematics A) r is inversely proprtional to a ,when r=12, a =1.5 b) what is the value of a when r =9 gib answer xd...
- C Chemistry What kind of electrochemical cell might likely be used for a task such a electroplating?...
- M Mathematics Vector u has its initial point at (17, 5) and its terminal point at (9, -12). vector v has its initial point at (12, 4) and its terminal point at (3, -2). find ||3u −...
- C Chemistry Aplant grows toward the light because in the plant cause some cells to grow longer than others....
- M Mathematics What is the pattern of 0.03,0,3,3,30...
- H History What did both martin luther king jr and ruby bridges both believe in and support?...
- M Mathematics Sue has 37 baseball cards. the next week she buys 5 more and 5 more the each week. when will she have 122 cards...
- B Biology What will most likely happen to a plant that does not receive enough sunlight a. the chloroplasts will produce more glucose b. the calvin cycle will increase its production...
- B Biology The twisting or cooling that occurs in the embryo of many gastropods is called the ? ?...
- E English Both my daughters husbands are terrible cooks. where are the apostrophes...
Ответ:
The program is an illustration of frames in Python:
Frames are part of what makes up a graphic user interface program.
The missing code segment in Python, where comments are used to explain each line is as follows:
#This defines the draw handler method
def draw_handler(canvas):
#This imports the random module
import random
#This generates a random number between 0 and 1000
randNum=random.randint(0,1000)
#This following iteration is performed once
for r in range (600,600):
#This sets the rgb color code to the random number
r = randNum; g = randNum; b = randNum
#This gets the color code
randRGBcolor = "RGB(" + str(r) + "," + str(b) + ")"
#This draws the points
canvas.draw_point([x, x],(randRGBcolor))
At the end of the program, the 1000 points are displayed on the screen
Read more about similar programs at:
link
Ответ:
You could generate random numbers between the pixel amount of the height and width than place the dots at those random points
Explanation:
Do you need the code or can you make it using my "headstart"
Ответ:
nope
Explanation:
so did u come here to date or do what