Answer:
Explanation:
The following Python program uses a combination of dictionary, list, regex, and loops to accomplish what was requested. The function takes a file name as input, reads the file, and saves the individual words in a list. Then it loops through the list, adding each word into a dictionary with the number of times it appears. If the word is already in the dictionary it adds 1 to its count value. The program was tested with a file named great_expectations.txt and the output can be seen below.
import re
def wordCount(fileName):
file = open(fileName, 'r')
wordList = file.read().lower()
wordList = re.split('\s', wordList)
wordDict = {}
for word in wordList:
if word in wordDict:
wordDict[word] = wordDict.get(word) + 1
else:
wordDict[word] = 1
print(wordDict)
wordCount('great_expectations.txt')
Answer:
The word efficient denotes the ability to achieve a good goal toward a person, and effectiveness denotes reliable production or achievement.
Explanation:
Many people around the world can set efficient goals, that is, to influence or encourage other people to make good projects or changes in their lives, by example or simply teach them with patience and altruism.
In this way effectiveness will be seen, that is, the product or the achievement precisely when we observe how people undertake new projects in their lives
Answer:
scheduling
Explanation:
Scheduling- it is referred to as assigning a task to complete the goal or work on time. he works can include data flow, processing of data, etc.
There are two main types of scheduling
1) Preemptive process
2) Non- preemptive process
Preemptive process - in this process, priority is given to important tasks rather than less important tasks. the current task can be held for an important task
Non-preemptive process - It is referred to that process when the predefined schedule follows. In this process, next task executed only when current task finish
Answer:
Following are the code to this question:
list_val = input()#defining a integer variable for input value
test_grades = list(map(int, list_val.split()))#defining test_grades as a list
sum_extra = -999 #defining sum_extra that holds negative integer value
sum_extra = 0#defining sum_extra that holds value
for y in range(len(test_grades)):#defining a for loop to check range of list
if(test_grades[y] > 100):# defining if block that check list value is greater then 100
sum_extra = sum_extra + (test_grades[y] - 100)#use sum_extra variable to hold extra value and add this value
print('Sum extra:', sum_extra)#print value
Output:
101 83 107 90
Sum extra: 8
Explanation:
In the above code a, "list_val" variable is declared, that uses an input method to input the values and declared a "test_grades" variable that uses a list method to add all values in the list.
In the next step, the "sum_extra" variable is declared, which holds some values and defines a for loop to check the range of the "test_grades", and define a if block, that checks list value is greater than 100. If the condition is true, it will remove the extra value, and add it into the sum_extera variable and add its value, and at the last use, print variable to print its value.
Answer:
Portrait orientation is taller then it is wide, while landscape orientation is wider then it is tall.
Explanation: