Gimme Shelter Roofers maintains a file of past customers, including a customer number, name, address, date of job, and price of job. It also maintains a file of estimates given for jobs not yet performed; this file contains a customer number, name, address, proposed date of job, and proposed price. Each file is in customer number order.

Required:
Design the logic that merges the two files to produce one combined file of all customers whether past or proposed with no duplicates; when a customer who has been given an estimate is also a past customer, use the proposed data.

Answers

Answer 1

Answer:

Hre the complete implementation of python code that reads two files and merges them together.

def merge_file(past_file_path,proposed_file_path, merged_file_path):

   past_file_contents=load_file(past_file_path)

   proposed_file_contents=load_file(proposed_file_path)

   proposed_customer_name = []

   for row in proposed_file_contents:

       proposed_customer_name.append(row[1])

   with open(merged_file_path,'w') as outputf:

       outputf.write("Customer Number, Customer Name, Address\r\n")

       for row in proposed_file_contents:

           line = str(row[0]) +", " + str(row[1]) + ", " + str(row[2]) +"\r\n"

           outputf.write(line)

       for row in past_file_contents:

           if row[1] in proposed_customer_name:

               continue

           else:

               line = str(row[0]) + ", " + str(row[1]) + ", " + str(row[2]) + "\r\n"

               outputf.write(line)

       print("Files merged successfully!")

# reads the file and returns the content as 2D lists

def load_file(path):

   file_contents = []

   with open(path, 'r') as pastf:

       for line in pastf:

           cells = line.split(",")

           row = []

           for cell in cells:

               if(cell.lower().strip()=="customer number"):

                   break

               else:

                   row.append(cell.strip())

           if  len(row)>0:

               file_contents.append(row)

   return file_contents

past_file_path="F:\\Past Customer.txt"

proposed_file_path="F:\\Proposed Customer.txt"

merged_file_path="F:\\Merged File.txt"

merge_file(past_file_path,proposed_file_path,merged_file_path)


Related Questions

Your location has been assigned the 172.149.254.0 /24 network. You are tasked with dividing the network into 13 subnets with the maximum number of hosts possible on each subnet.

Required:
a. What is the dotted decimal value for the subnet mask?
b. How many additional bits will you need to mask in the subnet mask?

Answers

The subnet mask would be a 32-bit integer which is formed by assigning the host bits to all 0's and the networking bits to so many 1's.In this method, the subnetting separates the IP address between host and network addresses.The subnet mask covers an IP address with its 32-bit number, thus the term "mask".

Given:

Network IP address [tex]\bold{= 172.149.254.0 /24}[/tex]

Subnet numbers [tex]\bold{= 13}[/tex]

Calculating the borrow bits:

[tex]\to \bold{= ceil(\log_{2} 13) = 4 \ bits}[/tex]

a)

Calculating the dotted decimal value for the subnet mask:

[tex]\to \bold{11111111.11111111.11111111.00000000}\\\\\to \bold{255.255.255.240}\\\\[/tex]

b)

The additional bits which will be needed to mask the subnet mask that is = 4.

Learn more: brainly.com/question/2254014

advantages of computational skill

Answers

Explanation:

algorithmic thinking - developing a set of instructions or sequence of steps to solve a problem;

evaluation - ensuring a solution is fit-for-purpose;

decomposition - breaking a problem down into its component parts;

What is system software? Write its types.​

Answers

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Explanation:

thanks for question

Imagine that you wanted to write a program that asks the user to enter in 5 grade values. The user may or may not enter valid grades, and you want to ensure that you obtain 5 valid values from the user. Which nested loop structure would you use?
A. A "for" loop inside of a "while" loop
B. A "while" loop inside of a "for" loop
C. None of the above
D. Either a or b would work

Answers

The type of nested loop which I would use to write the program is:

B. A "while" loop inside of a "for" loop

What is a Loop?

This refers to the control flow statement which is used to iterate and lets a particular line(s) of code execute repeatedly

With this in mind, we can see that the type of nested loop which I would use to write the program is a "while" loop inside of a "for" loop because it is a conditional statement that continues to ask for the certain valid grades until it gets the right one.

Therefore, the correct answer is option B

Read more about loops here:
https://brainly.com/question/26098908

(1)similarities between backspace key and delete key. (2) different between backspace key and delete key. (3) explain the term ergonomics. (4) explain the following. a click b right click c double click d triple click e drag and drop​

Answers

Answer:

1.similarity:

they are both editing keys

3.ergonomics are designed keying devices that alleviates wrist strain experienced when using ordinary keyboard for long hours

4.

.a click is pressing and releasing the left mouse button onceright click is pressing the right mouse button once to display a short cut menu with commands from which a user can make a selectiondouble click is pressing the left button twice in rapid successiondrag and drop is where by the user drags an icon or item from one location on the screen to another.

Neymar machine that Run on electricity

Answers

"Neymar" = "name a"?

if so, well, there are many, like the little glowing box you use the type questions to the brainliest community, let it be a phone, a pc, or a molded Nintendo

if you meant Neymar indeed, I'm not sure if he runs on electricity, unless he is a soccer playing android somehow.

I need someone to explain gor me python coding!

Answers

Answer:

Explanation:

Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general purpose language, meaning it can be used to create variety of different programs and isn't specialised for any specific problems

Marco travels often and does not have consistent wireless Internet service. He frequently uses his mobile phone service to provide Internet access to his tablet.

Which network type is Marco using?


LAN


PAN


WAN


MAN

Answers

Answer:

PAN

Explanation:

For wireless devices like laptops, tablets, wireless desktops, and cellphones to communicate, a wireless LAN normally has a Wi-Fi router or wireless access point. A wireless LAN is essentially a LAN that doesn't use cables. Thus, option B is correct.

What are the PAN  network type is Marco using?

The computer network that links computers and other devices within a specific person's range is known as a personal area network (PAN). PAN stands for personal area network and gives a network range within a person's range, often within a range of 10 meters (33 feet).

A PAN is a network that primarily serves a tiny space, usually a single small room. It allows computer devices to share data and information with other nearby computers.

Therefore, Whereas in LAN, computers are connected via a network over a short distance, such as within a building, or in a single computer network made up of several computers.

Learn more about network type here:

https://brainly.com/question/29515062

#SPJ2

If every company is now a technology company, then what does this mean for every student attending a business college

Answers

Answer:

Explanation:

There are all sorts of possibilities for, say, inserting new technologies into existing processes. But most of these improvements are incremental. They are worth doing; in fact, they may be necessary for survival. No self-respecting airline, for instance, could do without an application that lets you download your boarding pass to your mobile telephone. It saves paper, can't get lost and customers want it.

But while it's essential to offer applications like the electronic boarding pass, those will not distinguish a company. Electronic boarding passes have already been replicated by nearly every airline. In fact, we've already forgotten who was first.

Identify the statement about Windows tasks that is FALSE.


To launch an application, click the Windows icon, select "All Programs," and then click an application.


The boot process is the process for powering off a computer.


A common way to shut down the computer’s operating system is by using the Start menu.


Users log into their accounts on the Welcome screen, before Windows is ready to use.

Answers

The statement about Windows tasks that is FALSE is

The boot process is the process for powering off a computer.

According to the question, we are to discuss about Windows tasks and how it works as regards to the computer.

As a result of this we can see that  in launching an application;

we need to click on Windows iconselect "All Programs," click an application.

Therefore, The boot process is not the process for powering off a computer.

Learn more about Windows tasks .

https://brainly.com/question/1594289

The statement that is false is: The boot process is the process for powering off a computer, which is the second option. The boot process is actually the process of starting or powering on a computer, not powering it off.

The boot process refers to the sequence of events that occur when a computer is powered on or restarted. It is the process of starting up the computer's hardware and loading the operating system into memory so that it is ready for use. During the boot process, the computer's firmware (such as the BIOS or UEFI) performs a series of checks and tests to ensure that the hardware components are functioning correctly. It then searches for the operating system on connected storage devices, such as the hard drive or solid-state drive, and loads it into memory.

Learn more about the boot process here.

https://brainly.com/question/24355262

#SPJ6

Write a recursive function named is_decreasing that takes as its parameter a list of numbers. It should return True if the elements of the list are strictly decreasing (each element in the array is strictly less than the previous one), but return False otherwise.

Answers

Answer:

c

Explanation:

The term __________ denotes data that is being stored on devices like a universal serial bus (USB) thumb drive, laptop, server, DVD, CD, or server. The term __________ denotes data that exists in a mobile state on the network, such as data on the Internet, wireless networks, or a private network. A. data in transit, data on record B. data at rest, data in transit C. data in transit, data at rest D. data on record, data in motion

Answers

Answer:

B. data at rest, data in transit

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

Data at rest refers to a form of data that is stored on devices such as; a universal serial bus (USB) thumb drive, laptop, server, DVD, CD, or server.

Data in transit is simply any data that exists in a mobile or dynamic state on the network, such as data on the Internet, wireless networks, or a private network.

An engineer is configuring AMP for endpoints and wants to block certain files from executing. Which outbreak control method is used to accomplish this task

Answers

Question Completion with Options:

A. device flow correlation

B. simple detections

C. application blocking list

D. advanced custom detections

Answer:

The outbreak control method that is used to accomplish the task of configuring AMP for endpoints and to block certain files from executing is:

C. application blocking list

Explanation:

The application blocking list creates a list of application files, which the AMP continuously tracks and analyzes to compare the file activities with previous cyber attacks.  Specifically, the AMP for Endpoints is a cloud-managed endpoint security solution, which provides a retrospective alert to prevent cyber-security threats, and rapidly detects, contains, and remediates malicious files on the endpoints.

continuously tracks and analyzes files and file activities across your systems, and compares these events to what preceded or happened in past attacks. If a file exhibits malicious behavior, the AMP provides you with a retrospective alert which enables you to stop a potential threat from succeeding.

Can someone compress this ipv6 address? 558c:0000:0000:d367:7c8e:1216:0000:66be

Answers

558c::d367:7c8e:1216:0:66be

Irene llegó tarde al colegio_______________
ayúdenme


^_^^_^^_^^_^^_^^_^^_^^_^^_^​

Answers

Answer:

Explanation:

Absconding

To nest one structure within another structure, you a. define both structures and then create a data member of the nested structure type within the other structure b. create a container that holds objects of the nested structure type and then include the container within another structure c. define the nested structure within another structure

Answers

Answer:

Hence the correct option is option a) define both structures and then create a data member of the nested structure type within the other structure.

Explanation:

To make Address nested to Employee, we've to define Address structure before and out of doors Employee structure and make an object of Address structure inside Employee structure.

For example, we may need to store the address of an entity employee in a structure.

How do i connect WiFi on windows xp without icon?

Answers

Right click anywhere on your taskbar, and then click Properties. Step 2: Find and click the Notification Area tab on the top bar, and then find the section labeled with System icons, check the checkbox for Network. Last, click OK to finish it.

Answer:

Right click anywhere on your taskbar, and then click Properties. Step 2: Find and click the Notification Area tab on the top bar, and then find the section labeled with System icons, check the checkbox for Network. Last, click OK to finish it.

cho dãy số a[] có n phần tử và dãy số b[]cõ m phần tử là các các số nguyên dương nhỏ hơn 1000 . Gọi tập hợp A là tập các số khác nhau trong a[], tập hợp B là các số khác nhau trong b[]

Answers

Answer:

please translate

Thank you✌️

(viii) Word does not allow you to customize margins.
true/false:-​

Answers

In Word, each page automatically has a one-inch margin. You can customize or choose predefined margin settings, set margins for facing pages, allow extra margin space to allow for document binding, and change how margins are measured.

I would say false

Write down the short history of COMPUTER? ​

Answers

Answer:

Charles Babbage, an English mechanical engineer and polymath, originated the concept of a programmable computer. Considered the "father of the computer",he conceptualized and invented the first mechanical computer in the early 19th century.

what is a computer memory

Answers

Answer:

it is your answer

Explanation:

it is the storage space where data is kept.

Help Pls
I need about 5 advantages of E-learning​

Answers

Answer:

Explanation:

E-learning saves time and money. With online learning, your learners can access content anywhere and anytime. ...

E-learning leads to better retention. ...

E-learning is consistent. ...

E-learning is scalable. ...

E-learning offers personalization.

Answer:

E- learning saves time and money

E-learning makes work easier and faster

E- learning is convenient

E- learning is consistent

E- learning is scalable

Explanation:

when you learn using the internet, you save a lot of time by just typing and not searching through books

You are going to purchase (2) items from an online store.
If you spend $100 or more, you will get a 10% discount on your total purchase.
If you spend between $50 and $100, you will get a 5% discount on your total purchase.
If you spend less than $50, you will get no discount.
Givens:
Cost of First Item (in $)
Cost of Second Item (in $)
Result To Print Out:
"Your total purchase is $X." or "Your total purchase is $X, which includes your X% discount."

Answers

Answer:

Code:-

using System;

using System.Collections.Generic;

class MainClass {

public static void Main (string[] args) {

int Val1,Val2,total;

string input;

double overall;

Console.Write("Cost of First Item (in $)");

      input = Console.ReadLine();

Val1 = Convert.ToInt32(input);

Console.Write("Cost of Second Item (in $)");

      input = Console.ReadLine();

Val2 = Convert.ToInt32(input);

total=Val1+Val2;

if (total >= 100)

{

overall=.9*total;

Console.WriteLine("Your total purchase is $"+overall);

}

else if (total >= 50 & total < 100)

{

overall=.95*total;

Console.WriteLine("Your total purchase is $"+overall);

}  

else

{

Console.WriteLine("Your total purchase is $"+total);

}  

}

}

Output:

How many cost units are spent in the entire process of performing 40 consecutive append operations on an empty array which starts out at capacity 5, assuming that the array will grow by a constant 2 spaces each time a new item is added to an already full dynamic array

Answers

Answer:

Explanation:

260 cost units, Big O(n) complexity for a push

Ellen is working on a form in Access and clicks on the Design tab in the Form Design Tools section. Ellen then clicks on the Controls button and clicks the Label icon. What is Ellen most likely doing to the form?
A.adding a title
B.adding an existing field
C.changing the anchoring setting
D.changing the font of a label

Answers

Answer:

D. changing the font of a label

Which is the first computer brought in nepal for the census of 2028 B.S​

Answers

Answer:

The first computer brought in Nepal was IBM 1401 which was brought by the Nepal government in lease (1 lakh 25 thousands per month) for the population census of 1972 AD (2028 BS). It took 1 year 7 months and 15 days to complete census of 1crore 12.5 lakhs population.

Write a Python program stored in a file q1.py to play Rock-Paper-Scissors. In this game, two players count aloud to three, swinging their hand in a fist each time. When both players say three, the players throw one of three gestures: Rock beats scissors Scissors beats paper Paper beats rock Your task is to have a user play Rock-Paper-Scissors against a computer opponent that randomly picks a throw. You will ask the user how many points are required to win the game. The Rock-Paper-Scissors game is composed of rounds, where the winner of a round scores a single point. The user and computer play the game until the desired number of points to win the game is reached. Note: Within a round, if there is a tie (i.e., the user picks the same throw as the computer), prompt the user to throw again and generate a new throw for the computer. The computer and user continue throwing until there is a winner for the round.

Answers

Answer:

The program is as follows:

import random

print("Rock\nPaper\nScissors")

points = int(input("Points to win the game: "))

player_point = 0; computer_point = 0

while player_point != points and computer_point != points:

   computer = random.choice(['Rock', 'Paper', 'Scissors'])

   player = input('Choose: ')

   if player == computer:

       print('A tie - Both players chose '+player)

   elif (player.lower() == "Rock".lower() and computer.lower() == "Scissors".lower()) or (player.lower() == "Paper".lower() and computer.lower() == "Rock".lower()) or (player == "Scissors" and computer.lower() == "Paper".lower()):

       print('Player won! '+player +' beats '+computer)

       player_point+=1

   else:

       print('Computer won! '+computer+' beats '+player)

       computer_point+=1

print("Player:",player_point)

print("Computer:",computer_point)

Explanation:

This imports the random module

import random

This prints the three possible selections

print("Rock\nPaper\nScissors")

This gets input for the number of points to win

points = int(input("Points to win the game: "))

This initializes the player and the computer point to 0

player_point = 0; computer_point = 0

The following loop is repeated until the player or the computer gets to the winning point

while player_point != points and computer_point != points:

The computer makes selection

   computer = random.choice(['Rock', 'Paper', 'Scissors'])

The player enters his selection

   player = input('Choose: ')

If both selections are the same, then there is a tie

   if player == computer:

       print('A tie - Both players chose '+player)

If otherwise, further comparison is made

   elif (player.lower() == "Rock".lower() and computer.lower() == "Scissors".lower()) or (player.lower() == "Paper".lower() and computer.lower() == "Rock".lower()) or (player == "Scissors" and computer.lower() == "Paper".lower()):

If the player wins, then the player's point is incremented by 1

       print('Player won! '+player +' beats '+computer)

       player_point+=1

If the computer wins, then the computer's point is incremented by 1

   else:

       print('Computer won! '+computer+' beats '+player)

       computer_point+=1

At the end of the game, the player's and the computer's points are printed

print("Player:",player_point)

print("Computer:",computer_point)

what is computer? write about computer.​

Answers

Answer:

Is an electronic device used for storing and processing data.

A desktop computer is a type of mobile device.

a. true
b. false

Answers

Answer:B.false
Answer B

A desktop computer is a type of mobile device: B. False.

What is a desktop computer?

A desktop computer simply refers to an electronic device that is designed and developed to receive data in its raw form as an input and processes these data into an output that's usable by an end user.

Generally, desktop computers are fitted with a power supply unit (PSU) and designed to be used with an external display screen (monitor) unlike mobile device.

In conclusion, a desktop computer is not a type of mobile device.

Learn more about desktop computer here: brainly.com/question/959479

#SPJ9

Given two integers that represent the miles to drive forward and the miles to drive in reverse as user inputs, create a SimpleCar object that performs the following operations:Drives input number of miles forwardDrives input number of miles in reverseHonks the hornReports car statusThe SimpleCar class is found in the file SimpleCar.java.100 4the output is:beep beepCar has driven: 96 milesimport java.util.Scanner;public class LabProgram { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); /* Type your code here. */ }}

Answers

Answer:

Explanation:

The following code is written in Java. It creates the SimpleCar class with the variables for position, milesForward, and milesReverse. It contains the constructor, Honk, reportStatus, and setter methods needed and as requested. The scanner object is created in the main method and asks the user for the number of miles forward as well as the number of miles in reverse. A test case was created and the output can be seen in the attached image below.

import java.util.ArrayList;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("How many miles forward did the car drive?");

       int forward = in.nextInt();

       System.out.println("How many miles in reverse did the car drive?");

       int reverse = in.nextInt();

       SimpleCar beep = new SimpleCar(forward, reverse);

       beep.Honk();

       beep.reportStatus();

   }

}

class SimpleCar {

   int position;

   int milesForward;

   int milesReverse;

   public SimpleCar(int milesForward, int milesReverse) {

       this.milesForward = milesForward;

       this.milesReverse = milesReverse;

       this.position = 0;

   }

   public void Honk() {

       System.out.println("HONK");

   }

   public void reportStatus() {

       position = milesForward - milesReverse;

       System.out.println("Car is " + position + " miles from starting point.");

   }

   public void setMilesForward(int milesForward) {

       this.milesForward = milesForward;

       this.position += milesForward;

   }

   public void setMilesReverse(int milesReverse) {

       this.milesReverse = milesReverse;

       this.position -= milesReverse;

   }

}

Other Questions
and this is right or not If f(x) = -x2 1, andg(x) = x + 5, thenf(g(x)) = [ ? ]x2+[? ]x+[?] Please answer this question. Will give brainiest fast Determine the type of quadrilateral given the following coordinates. Show and explain all steps to prove your answer. A(2, 3) B(-1, 4) C(0, 2) D(-3, 3) Factorize the following by splitting the middle term:-(a) 3x^2 +11x+30 Evaluate the function.f(x) = 4x + 73 18Find f(-9) 2nd time. l'll give ya brainliest if you answer lol anywaycan someone make this sentence more like a 7th grader said it or something:The West has large open areas untouched by people. The land includes large forests, deserts, and mountains. The variety causes wide differences in weather. Hiking and camping are popular. The environment is an important issue. Ranching, lumbering, and mining are important industries. Los Angeles, Seattle, and Denver are major cities Camille is attending a fundraiser. She pays for her admission and buys raffle tickets for $5dollar each. If she buys 10 raffle tickets, then she would spend a total of $135 at the fundraiser.The number S of dollars Camille spends at the fundraiser is a function of r, the number of raffle tickets she buys.Write the function's formula. Which of the following is NOT something you should always do before a journey? A. Map the road ahead B. Deflate and reinflate your tires C. Assess your fitness to drive D. Use the GPS properly, if necessaryHelp plz Find the 20th term of the following sequence.-6, -4,-2, O,... is the answer correct or wrong "Neanderthals were much more like man than thought", if today we meet a Neanderthal face to face: (choose the correct option) *A. I would recognize it because they were taller and stronger than human beings.B. They could only live in Europe and no one would notice.C. I couldn't recognize it because they were so much like us.Choose the correct option. The Stone Age is divided into Neolithic and Paleolithic, then..A. Neanderthals worked stone and some metals.B. Neanderthals lived until the Neolithic because they discovered agriculture.C. Neanderthals had great knowledge of stoneworking techniques.Choose the correct optionA. Neanderthals and humans are the sameB. Between Neanderthals and humans there is a minimal difference.C. Humans were the only ones who made paintings. Write the words that represent s + 21. Anyone knows the answer? Based on the Lewis/electron dot representationof the two atoms, predict the ratio of metalcationic (+) atom to nonmetal anionic (-) atom inthe compound..Ca..P.A. 1:1B. 3:2C. 2:1D. 3:1Can someone plz tell me how to do this. simplify (5abc 6ac + 7cb) (10abc + 6ac 8bc) PLEASE TRY TO HELP SOLVE EITHER ONE (OR BOTH). THX!1. Take an 13 by 8 rectangular grid. Color each of the 1 by 1 cells either solid red, solid white, or solid blue. Show that there are at least two 2 by 2 squares in the grid that are colored exactly the same.2. Every day of the 10-week summer break, Pamela ate 1 or 2 carrots. Over the course of the summer, she ate a total of 100 carrots. Show that there was an interval of days during the summer break during which Pamela ate exactly 35 carrots. To begin the experiment, Xavier washed his hands and put on safety goggles. He then measured 120 milliliters of tap water, 2.5 milliliters of baking soda, and 2.5 milliliters of citric acid. The initial temperature of the water was 23.5C.Next Xavier added the baking soda and citric acid to the water. The mixture immediately began to bubble vigorously, which lasted for about 30 seconds. The new temperature of the mixture was 17.7C.Is a chemical reaction taking place during Xaviers experiment? How do you know? WILL GIVE BRAINLIEST!!!!!!!!!!!!!!! Which of these organelles prepares proteins to be fully functional?A. Rough endoplasmic reticulumB. Large vacuolesC. Smooth endoplasmic reticulumD. Chloroplasts Explain the role of cellular respiration in a cell.