subject

FlagInitials () Write the function flagInitials that draws your three initials (first name, middle name, last name) in maritime letter flags, using turtle graphics. For example, 2008 Turing Award winner Barbara Liskov would draw the flags associated with her initials BJL. (If you have multiple middle names, choose your favourite.)Maritime letter flags are used on ships to signal other ships. For a good drawing of each letter flag, see the Wikipedia entry on ‘International maritime signal flags’. Note that each flag is a square. Please draw a black border around each flag (1 pixel wide).You will use randomization to vary how you draw your flags. The bottom left corner of the first flag is drawn at a random point in the rectilinear square bounded by (-200,-200) and (0,0). Each flag is of the same width w, which is chosen randomly in (100,200). The gap between consecutive flags should be a random number between 1 and 10. Since these random numbers determine the size and position of the flags, each time you run the code you should see a slightly different drawing. The use of random size and position is my way of encouraging the use of variables over magic numbers. A statement like ‘forward(40)’ uses a magic number 40. A statement like ‘forward(w/2)’ where ‘w’ has a semantic meaning of width, is much better: it documents your thought, and it is easily generalized to different widths.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:40
Mary's manager told her she should insert a graphic into her documentwrite mary a brief note describing how to insert a graphicin a word processing document.
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
You know the right answer?
FlagInitials () Write the function flagInitials that draws your three initials (first name, middle n...
Questions
question
Mathematics, 16.06.2021 05:00
question
Engineering, 16.06.2021 05:00
question
Mathematics, 16.06.2021 05:00
Questions on the website: 13722360