Answer:
def course_grader(student_to_grades, course_prefix):
student_grades = dict()
for key, value in student_to_grades.items():
grade_score = 0
for course,grade in value.items():
if course_prefix == course:
grade_score += grade
student_grades[key] = grade_score / len(value.keys())
return student_grades
Explanation:
The course_grader function is a python program that accepts two arguments, the student dictionary and the course prefix. The function returns a dictionary of the student id as the key and the average grade of the student as the value.
Answer:
It is an example of a matrix structure
Explanation:
The matrix structure is a structure in which jurisdiction, controls and duties are carried and uphold by a group of employees instead of just the manager.
In other words, employees have dual reporting relationships; they can give reports to the functional manager and they can also give reports to the product manager.
The Bennetton design selected by the network of Bennetton retail sales agents made activities to be easily coordinated because, they have collectively performed the duty as a unit and this is one of the advantages of this form of the matrix organizational structure.
Answer:
my choice purpose
Explanation:
the writer simply writes with a purpose to make his audience understand it's with the purpose that he writes
Answer:C
Explanation:I got it correct on the computer
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')