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]
2 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]2 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
Hello pls answer<br><br><br>what is the use of loop in java​
xxMikexx [17]
The use of loop in java is to run a block of code for a certain number of times.
7 0
2 years ago
Catering question<br> What is the hottest food in the world
Elza [17]
The hottest food in the world is a Ghost Pepper. It is 400 times hotter than Tabasco sauce. It was 1 million SHU's! Hope this helps! ^0^

The correct answer is: Ghost Peppers
7 0
3 years ago
Add (total) all the number in the list (below) using a for loop, but skip over the number at index 3.
user100 [1]

Answer:

The program in Python is as follows:

numbers = [10,20,30,40,50,60,100]

total = 0

for i in range(len(numbers)):

   if i != 3:

       total+=numbers[i]

print(total)

Explanation:

This initializes the list

numbers = [10,20,30,40,50,60,100]

Set total to 0

total = 0

This iterates through numbers

for i in range(len(numbers)):

This ensures that the index 3, are not added

<em>    if i != 3:</em>

<em>        total+=numbers[i]</em>

Print the calculated sum

print(total)

3 0
2 years ago
You recently purchased a new laptop for home. You want to ensure that you are safe from malware. You should install a personal _
german

Answer:

You should install a personal firewall, a program that protects your computer from unauthorized access by blocking certain types of communications.

Explanation:

In computing, a firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. A firewall typically establishes a barrier between a trusted internal network and untrusted external network, such as the Internet.

8 0
3 years ago
2min speech on can teachers be replace by technology​
elena-s [515]

Answer:

The boom of online courses, where anyone can learn from the comfort of one’s own home or office at their own chosen time is the main cause. When online courses made their foray a decade ago, the same question of technology replacing teachers in schools emerged as a major argument. However, if we ask you today whether calculators can replace mathematics teachers at school, what would you say? Sounds weird, right! Do you think calculators which are also a kind of a technological advancement only, are capable enough of themselves, so as to replace the teachers? The answer is obvious. It’s an obvious No!

6 0
2 years ago
Other questions:
  • Students recently created a Gaming Club at their school. On Friday of every week, students bring in their gaming consoles (Xbox,
    10·1 answer
  • A _____________ is a method of controlled entry into a facility and provides access to secure areas such as a research lab or da
    10·1 answer
  • What considerations have to be kept in mind with JPEG
    10·1 answer
  • A mobile device has stopped receiving automatic OS updates that until recently were pushed to the device.
    7·2 answers
  • A star appears under the <br> menu of the word processing program.
    5·1 answer
  • Example of negative body language include all but
    8·1 answer
  • ASAP BRAINLIEST!!!
    10·1 answer
  • What was the name of first computer?
    14·1 answer
  • While working in a group of two the members are not getting along. You bring the two members together so they can discuss this i
    11·1 answer
  • What are benefits of AI
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!