Answer:
A
Explanation:
Top-down is a programming style, the mainstay of traditional procedural languages, in which design begins by specifying complex pieces and then dividing them into successively smaller pieces.
Answer:
she can indent the first line of her paragraph by clicking on the space bar a series of time.
Answer:
Step 1
Open the flowchart and locate the startinglocation on the chart.
Step 2
Write the pseudocode that is equivalent to the rectangular process boxes in your diagram.
Step 3
Write the pseudocode for the diamond-shaped decision boxes in your diagram.
Step 4
Write the pseudocode for the end terminator of the flowchart.
Combine all of your converted statements above and you have a flowchart that has been converted to pseudocode.
Answer:
def wordLineCount(file):
dic = {}
with open(file,'r') as file:
text = file.read()
text = text.strip().split()
for word in text:
if word in dic:
dic[word] += 1
else:
dic[word] = 1
return dic
print(wordLineCount('ben.txt'))
Explanation:
The programming language used is python.
The program starts by defining the function, an empty dictionary is created to hold the words and the number of times that they occur. the with key word is used to open the file, this allows the file to close automatically as soon as the operation on it is finished.
The data in the file is read to a variable text, it is striped from all punctuation and converted to a list of words.
A FOR loop and an if statement is used to iterate through every word in the list and checking if they are already in the dictionary. if the word is already contained in the dictionary, the number of occurrences increases by one. otherwise, it is added to the dictionary.
check the attachment to see code in action.