Answer:
Following are the code to this question:
file= open('book.txt') #open file
li= {} #define an empty list
for lines in file: # use for loop Split file data into words
d= lines.lower().strip(' !?').split() #define variable d that Add it to map
for val in d: #define loop to store data
if val not in li: #check value is not in list
li[val] = 0 #define list and assign value in 0
li[val] = li[val] + 1 #Sort the book data and add its value
m = sorted(li.items(),key = lambda x : -x[1]) #sorted value into the m variable
print(m[:10]) #print value
Output:
please find the attachment.
Explanation:
In the given python code first, we open the file "book.txt", in next line, an empty list is defined, that uses the for loop which can be described as follows:
- In the for loop is used, that reads the file data, and defines a variable "d", that stores the values into the map.
-
In the next line another loop is used, that check file values, if values are the same type so, it adds values and writes it.
- In the last line, m variable is used, that sorts the values and use the slicing to print its value.
Answer:
Building Blocks
Explanation:
When referring to the Publisher Application the navigation feature that allows you to do this is the Building Blocks feature. Like mentioned in the question this feature allows you to choose from and insert a predefined set of calendars for insertion into a publication as well as insert a variety of other page parts to better customize the feel of the publication.
I'm guessing you mean the six external parts as in input and output devices
Here are the six external parts:
>Keyboard
>Mouse
>Monitor
>Speakers
>Printer
>Microphone or USB...I think you can choose either one as they are components outside of the computer/external/ -I/O devices
Answer:
myDoubles.add(75.6);
Explanation:
ArrayList<Double> myDoubles = new ArrayList<Double>();
myDoubles.add(10.8);
myDoubles.add(92.46);
myDoubles.add(75.6);
The above code creates a double ArrayList called myDoubles. We add 10.8 and 92.46 initially. After these numbers, 75.6 is added to the myDoubles using <em>add</em> method (You need to type the list name, ".", and the method name to add the number)