subject
Engineering, 16.12.2019 20:31 carrie85

This project focuses on analyzing a publicly available dataset containing information about some infamous breaches that have occurred in the past.

open_file(message) -> fp
this function taken in a prompt message (string) and returns a file pointer. you likely have a copy from a previous project. it repeatedly prompts for a file until one is successfully opened. it should have a try-except statement. by default (when the user does not provide a filename), this function opens the file ‘breachdata. csv’. important: remember to open the file with the correct encoding as shown below.

fp = open(filename, encoding='utf8')

build_dict(reader) -> dictionary
this function accepts a csv reader as input and returns the required dictionary. it iterates over the csv reader and with each iteration, extracts the needed data and remove any extra whitespaces. you need to skip the header line before start reading the data:

next(reader, none)
the data to be extracted is:

entity - index 0 (string)
records lost - index 2 (int)
year - index 3 (int)
story - index 4 (string)
sector – index 5 (string)
method - index 6 (string)
news sources - index 11 (list of strings)

valid data checks:

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 23:20
Two technicians are discussing the intake air temperature (iat) sensor. technician a says that the computer uses the iat sensor as a backup to the engine coolant temperature (ect) sensor. technician b says that the powertrain control module (pcm) will subtract the calculated amount of fuel if the air measures hot. who is correct
Answers: 3
question
Engineering, 04.07.2019 18:10
Afour cylinder four-stroke in-line engine has a stroke of 160mm, connecting rod length of 150mm, a reciprocating mass of 3kg and its firing order is 1-3-4-2. the spacing between cylinders is 100mm. i. show that the engine is in balance with regard to the primary inertia forces and primary 3. a and secondary inertia couples. li determine the out of balance secondary inertia force ii. propose ways of balancing this out of balance force and discuss the challenges that will arise
Answers: 3
question
Engineering, 04.07.2019 18:10
The filament of an incandescent lamp has a temperature of 2000k. calculate the fraction of radiation emitted in the visible light band if the filament is approximated as blackbody
Answers: 2
question
Engineering, 04.07.2019 18:10
Shafts are machine elements that are used to a) carry axial loads b) direct shear loads c) transmit power d) rotate at constant speed e) none of the above circular and square shafts subjected to the same torque under the same circum behave a) the same way b) almost the same way
Answers: 2
You know the right answer?
This project focuses on analyzing a publicly available dataset containing information about some inf...
Questions
question
Mathematics, 23.11.2019 10:31
Questions on the website: 13722361