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
nordsb [41]
3 years ago
7

Write a script named numberlines.py. This script creates a program listing from a source program. This script should: Prompt the

user for the names of two files. The input filename could be the name of the script itself, but be careful to use a different output filename! The script copies the lines of text from the input file to the output file, numbering each line as it goes. The line numbers should be right-justified in 4 columns, so that the format of a line in the output file looks like this example: 1> This is the first line of text
Computers and Technology
1 answer:
ddd [48]3 years ago
4 0

Answer:

See explaination for program code.

Explanation:

inputFileName = input("Input filename: ") outputFileName = input("Output filename: ") inputFile = open(inputFileName, "r") outputFile = open(outputFileName, "w") count = 1 for line in inputFile: newLine = str(count).rjust(4, " ") + "> " + line outputFile.write(newLine) print(newLine) count += 1

You might be interested in
If your computer has a ________, someone else can gain access to it undetected.
irinina [24]
<span>If your computer has a rootkit, someone else can gain access to it undetected.
</span>The term rootkit denotes a set of software tools <span>typically malicious.
 The purpose of this software is to enable access to a computer or areas of its software that is not otherwise allowed.
</span><span>It is one of the most difficult types of malware to find and remove.</span>
3 0
3 years ago
Your task is to identify three or more ways that big data is being collected on a regular basis, including one data collection m
attashe74 [19]

Answer:

Data is one of the most valuable resources today's businesses have. ... There are various data-gathering methods you can use with the help of your ... When it comes to data businesses collect about their customers, ... Third-party data offers much more scale than any other type of data, ... Big White Cursor.

Explanation:

4 0
3 years ago
Jenny is working on a laptop computer and notices that the computer is not running very fast. She looks and realizes that the la
Stolb23 [73]

Answer:

You are allowed to take out the old ram to replaice it, so replaice it with 2 new 4 GB of ram you dont need to unless the laptop has already 4 GB of ram the type of ram you will use is DDR3 most newer pc's have DDR4 since laptopes are smaller you would need older ram

Explanation:

8 0
3 years ago
Read 2 more answers
A=4x^2.(x-2y)-20x.(2y-x)
Luda [366]

Answer:

please give point

6 0
2 years ago
Adobe Indesign project 4 museum indesign file. The instructions are 70 pages long I cant sit still long enough to read them
Alchen [17]

Answer:

? Read on to learn about the possible reasons and resolutions. ... Check whether you have the latest update installed for InDesign. ... InDesign cannot open the file when your system does not have enough memory ... Copy page elements into a new document.

Explanation:

4 0
3 years ago
Other questions:
  • Which of these is an on-site metric for social media marketing?
    13·1 answer
  • You can toggle between different types of references by pressing the ____ key on your keyboard.
    15·1 answer
  • Why does the job market change overtime
    9·1 answer
  • When subjects are given two drinks but not told what they are drinking in order to get accurate results on which is the better t
    6·1 answer
  • Write a function safeOpen() that takes one parameter, filename — a string giving the pathname of the file to be opened for readi
    15·1 answer
  • What does the internet engineering task force (IEFT) do?
    5·1 answer
  • Help me find the difference between these logos
    10·2 answers
  • 45 points!
    10·2 answers
  • Your worksheet contains a price in cell A5 and many formulas refer to that price how would you refer to that price in the formul
    12·1 answer
  • PLSS HELP ASAP ILL GIVE BRAINLIEST THANKS
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!