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
Lerok [7]
3 years ago
6

Write a basic program that performs simple file and mathematical operations.

Computers and Technology
1 answer:
Ostrovityanka [42]3 years ago
7 0

Answer:

Explanation:

I have written the Python program based on your requirements.

Just give the path of the input file and the path for the output file correctly where you want to place the output file.

In, my code - I have given my computer's path to the input and output file.

You just change the path correctly

My code works perfectly and I have tested the code with your inputs.

It gives the exact output that you need.

I have attached the Output that I got by running the below program.

Code:

month_list={ "january":"1","february":"2", "march":"3","april":"4", "may":"5", "june":"6","july":"7", "august":"8", "september":"9","october":"10", "november":"11", "december":"12"} input_file=open('C:\\Users\\Desktop\\inputDates.txt', 'r') output_file=open('C:\\Users\\Desktop\\parsedDates.txt','w') for each in input_file: if each!="-1": lis=each.split() if len (lis) >=3: month=lis [0] day=lis[1] year=lis [2] if month.lower() in month_list: comma=day[-1] if comma==',': day=day[:len (day)-1] month_number=month_list[month.lower()] ans-month_number+"/"+day+"/"+year output_file.write (ans) output_file.write("\n") output_file.close() input_file.close()

- O X parsedDates - Notepad File Edit Format View Help 3/1/1990 12/13/2003

- X inputDates - Notepad File Edit Format View Help March 1, 1990 April 2 1995 7/15/20 December 13, 2003 -1

cheers i hope this helped !!

You might be interested in
Henry has created a software product that manages a database of company clients. He wants to install the software on a client's
UkoKoshka [18]

Answer:

The answer is " Run the software on the original web browser practically".

Explanation:

The Virtual servers enable you to run programming not programmed to the devices. Let's all presume which Henry's software will operate on computers but not on the mac. Since Mac is unable to run this software, it can practically install Linux on MC and install this.

  • The several common software applications such as parallels, VMware, and Virtual machines could be practically used during mac to install windows.
  • Its platform operating system from a macOS software perspective is a true physical computer with almost everything set.
5 0
2 years ago
Which vendor did IBM select to create the operating system for the IBM PC?
schepotkina [342]
The Answer Is: "Microsoft".
7 0
3 years ago
The goals of _____ are to determine the work load at which systems performance begins to degrade and to identify and eliminate a
Vitek1552 [10]

Answer:

volume testing hope this helps :)

7 0
2 years ago
A negative effect of computer technology's role in creating images is that:
otez555 [7]

Answer:

Personally would go with D.

Information being shared could be both good and bad but it all would be about the situation and if it was private information or not.

5 0
3 years ago
Read 2 more answers
You would like to set up on online meeting to communicate with colleagues on a group project. Which of these tools should you su
Elenna [48]
WebEx :))))))))))))))))))))))
8 0
3 years ago
Read 2 more answers
Other questions:
  • Where can you place CSS statements in an HTML file?
    7·1 answer
  • Write a C program to implement a command called ​displaycontent ​that takes a (text) file name as argument and display its conte
    9·1 answer
  • For a wire with a circular cross section and a diameter = 3.00mm calculate the following: (m means meter. mm means millimeter. c
    5·1 answer
  • The icon below represents the ____________.
    8·1 answer
  • In this challenge, write a function to add two floating point numbers. Determine the integer floor of the sum. The floor is the
    8·1 answer
  • The Windows taskbar is generally found _____. at the top of the screen in the Start menu at the bottom of the screen at the righ
    14·2 answers
  • What is lossless compression
    6·2 answers
  • Write a SELECT statement that returns one row for each musician that has orders with these columns:
    13·1 answer
  • Cybersquatters:_________.
    5·1 answer
  • you are asked to create a four-digit code using the numbers from 1 to 9. how many possible codes are there--assuming that number
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!