Computers and Technology

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:00, ericadawn2852
How do i draw hello world in python and how do i make it loop?
Answers: 1
image
Computers and Technology, 21.06.2019 22:00, littleprinces
Your task this week is to write a very simple spam classifier in python. it will classify messages as either spam (unwanted) or ham (wanted). the program will have a set of spam_words, words that are known to appear in spam messages. that set is included in the template file spam. pypreview the document. you will also define a spam threshold which reflects the allowed percentage of spam words in the message. you'll compute a 'spam indicator', which is the ratio of spam words to the total number of unique words in the message. if the spam indicator exceeds the spam threshold, the message is classified as spam. otherwise it is classified as ham. we'll assume that the spam threshold is a constant and has a value of 0.10. your program will prompt the user for a message and then will print the corresponding spam indicator with two decimal digits and the corresponding classification (spam or ham). the program will be case insensitive. the spam words are detected whether they are in lower case or upper case or mixed case. each word, spam or not, is counted once (even if it appears multiple times in the message.) the program will remove punctuation from the message before identifying the words and computing the spam indicator. for example '! ' must be identified as the spam word 'now'.
Answers: 3
image
Computers and Technology, 22.06.2019 20:00, random286
How is the number 372 written when expanded out to place values in the base 8 (octal) number system? a. 2 x 4 + 3 x 2 + 4 x 1 b. 3 x 64 + 7 x 8 + 2 x 1 c. 3 x 8 + 7 x 7 + 2 x 6 d. 3 x 100 + 7 x 10 + 2 x 1
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, juuuuuu42
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
Do you know the correct answer?
FlagInitials () Write the function flagInitials that draws your three initials (first name, middle n...

Questions in other subjects:

Konu
History, 27.09.2020 19:01
Konu
Mathematics, 27.09.2020 19:01