1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aleksandrvk [35]
3 years ago
11

"Create a Python program named detect_column_level_data_entry_errors. When complete, you will run this program to produce a diag

nostic report that shows data entry errors that cause column totals in the data to be out of balance. You will be expected to edit the cleaned_data.txt input file and make corrections until running this program shows that all column-level errors have been resolved."
Computers and Technology
1 answer:
11111nata11111 [884]3 years ago
8 0

Answer:

See explaination

Explanation:

Code for detect_column_level_data_entry_errors.py:

# File: detect_column_level_data_entry_errors.py

# The program will produce a diagnostic report that shows data entry errors that cause column

# totals in the data to be out of balance. Will need to fix cleaned_data.txt until errors resolved.

def main():

input_filename = input('Please enter the input filename: ')

infile = open(input_filename, 'r', encoding='utf8')

total_males = 0

total_females = 0

sum_total = 0

print('\n{0:^40}'.format('Column-Level Data Entry Errors'))

print('\n{0:<10}{1:>10}{2:>10}{3:>10}'.format(

'Age Group', 'Males', 'Females', 'Total'))

for line in infile:

age_group, males, females, total = line.split()

males = int(males)

females = int(females)

total = int(total)

print('{0:<10}{1:>10,}{2:>10,}{3:>10,}'.format(

age_group, males, females, total))

if age_group != 'Total':

total_males = males + total_males

total_females = females + total_females

sum_total = total + sum_total

else:

print('{0:<10}{1:>10,}{2:>10,}{3:>10,}'.format(

'Error', (males-total_males), (females-total_females), (total-sum_total)))

infile.close()

main()

You might be interested in
Inserting and deleting text is a basic editing task in word processing.<br><br> True or false
Katyanochek1 [597]
The answer should be true
3 0
3 years ago
Read 2 more answers
what is the least expensive way to connect five computers using a wired network to a router that has only four network ports?
ExtremeBDS [4]

Answer: Get wifi.

Explanation: Get wifi.

5 0
2 years ago
From the binary search algorithm, it follows that every iteration of the while loop cuts the size of the search list by half.
Colt1911 [192]

Answer:

True: In binary search algorithm, we follow the below steps sequentially:

Input: A sorted array  B[1,2,...n] of n items and one item x to be searched.

Output: The index of x in B if exists in B, 0 otherwise.

  1. low=1
  2. high=n
  3. while( low < high )
  4.  {      mid=low + (high-low)/2
  5.         if( B[mid]==x)
  6.          {
  7.             return(mid)  //returns mid as the index of x
  8.           }
  9.          else
  10.          {
  11.              if( B[mid] < x)      //takes only right half of the array
  12.               {
  13.                 low=mid+1
  14.               }
  15.              else               // takes only the left half of the array
  16.               {
  17.                high=mid-1
  18.               }
  19.           }
  20.  }
  21. return( 0 )

Explanation:

For each iteration the line number 11 or line number 15 will be executed.

Both lines, cut the array size to half of it and takes as the input for next iteration.

6 0
4 years ago
In a server farm such as that used by Amazon or eBay, a single failure does not cause the entire system to crash. Instead, it wi
Jet001 [13]

Answer:12 days

Explanation:

Mean time to failure is given by

MTTF=\frac{Total working hours of running}{Total no. of units}

Let's say N is the average amount  of time system runs until \frac{1}{3} computer fail

MTTF of each computer =35

35=\frac{n\cdot 10,000}{10,000\cdot \frac{1}{3}}

35=N\cdot 3

N=\frac{35}{3}=11.667\approx 12days

8 0
3 years ago
Tech A says that most lug nuts and studs are right-hand threaded, which means they tighten when turned clockwise. Tech B says th
LekaFEV [45]

This question is incomplete.

Complete Question

Tech A says that most lug nuts and studs are right-hand threaded, which means they tighten when turned clockwise. Tech B says that some lug nuts and studs are left-handed, which means they tighten when turned counterclockwise. Who is correct?

a) Tech A

b) Tech B

c) Both Tech A and B

d) Neither Tech A not B

Answer:

c) Both Tech A and B

Explanation:

The Wheels of cars or vehicles are attached or fastened to the car rims using what we call lug nuts and wheel studs. The lug nuts attached or torqued properly on the wheel studs in order to ensure that the wheels of the car are well secured , attached and firm.

We have different types of lug nuts and wheel studs. The differences is based on the threading that it found on both the lug nut and wheel studs.

We have:

a) The right handed threaded lug nuts and studs(wheel studs)

b) The left handed threaded lug nuts and studs(wheel studs).

The right handed threaded lug nuts and studs are tightened when they are turned in the clockwise direction while left handed threaded lug nuts and studs are tightened in the anticlockwise or counterclockwise direction.

It is important to note that no matter the kind of lug nuts and studs(whether right handed threaded or left handed threaded) used to fastened wheels to car rims, it is essential that they are well fastened and torqued to car to prevent them from loosening up.

For the question above, both Tech A and Tech B are correct. Therefore , Option C is the correct option.

5 0
3 years ago
Other questions:
  • Utility software can help you to
    12·1 answer
  • Which of the following could not be represented by columns in the SPSS data editor? a. Levels of between-group variables. b. Lev
    11·2 answers
  • To share a document in my online electronic journal, I should select the option to _____.
    14·1 answer
  • Your company has just opened an office in another state and you need the computers to communicate between the offices. What type
    13·1 answer
  • What is the purpose of a subject in an email​
    10·2 answers
  • Name the steps to insert a cover page.
    14·1 answer
  • What is the purpose of a poster frame?
    5·2 answers
  • Which goal of design theory can be described as the proper distribution
    7·1 answer
  • Predict the future that social media will have on society or the environment
    12·1 answer
  • What is the role of the computer in banking system?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!