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
Yuri [45]
3 years ago
7

Write code that does the following: opens an output file with the filename numbers.txt , uses a loop to write the numbers 1 thro

ugh 100 to the file, and then closes the file.
Computers and Technology
2 answers:
kirza4 [7]3 years ago
4 0

Answer:

numbersFile=open("numbers.txt","w")

for i in range(1,101):

   

   numbersFile.write("%s\n" % i)

numbersFile.close()

Explanation:

The programming language used here is python,.

The first line opens a file numbers.txt in the write mode (w), which means you can add new lines of text to the file.

In the second line, the range function is used with a FOR loop to generate a range of numbers from 1 through 100.

In the third line, the program adds all the numbers generated by the range and FOR loop to the txt file, and finally the file is closed.

otez555 [7]3 years ago
3 0
#include <iostream> #<span>include <fstream> </span>using<span> namespace std; int main( int argc, ... </span>outputFile.open( "<span>primeNumbers.txt" ); //

Maybe this will help :)</span>
You might be interested in
Discuss the inte Generation of computer, Inlith
ch4aika [34]

Generations of Computers

The computers of today find their roots in the second half of the twentieth century. Later as time progressed, we saw many technological improvements in physics and electronics. This has eventually led to revolutionary developments in the hardware and software of computers. In other words, soon the computer started to evolve. Each such technological advancement marks a generation of computers.

3 0
3 years ago
Which of these is unused normal, unvisited link ??
Tomtit [17]

Answer:

hover

Explanation:

hope my answer help you

8 0
3 years ago
The source ip address is 164.109.28.3 subnet mask of 255.255.128.0 network address is
Sergeu [11.5K]
164.109.0.0/17




-------------------------------------------
6 0
3 years ago
Which statement best describes the concept of usability?
nordsb [41]

Usability emphasizes utility over aesthetics  statement best describes the concept of usability.

B.  Usability emphasizes utility over aesthetics.

<u>Explanation:</u>

Usability mainly speaks about the utility of an item. There are many wastes created in home and work place and those are sometimes thrown without knowing that it can be re-used for another purpose.

It is always better to re-use the product without considering aesthetic aspects though aesthetic is equally important. We can make the old objects to create a new one.

There are many videos in the social media to make the old objects to be used as a sub-product to create a new object and sometimes it looks better than an old one.

4 0
3 years ago
Read 2 more answers
A(n) systems analyst codes system software, fine-tunes operating system performance, and performs other system software-related
NikAS [45]
In general, a systems analyst is a person who uses analysis and design strategies to solve business problems.
They also analyze an organization’s current computer systems and develop information systems solutions to help the organization run more smoothly.

Now knowing a systems analyst job, therefore the answer to this is “FALSE”.

<span> </span>

6 0
3 years ago
Other questions:
  • In a paragraph of no less than 125 words, explain what netiquette is and how it improves efficiency and productivity in the work
    14·1 answer
  • Which of the following describes an acceptable print resolution?
    7·1 answer
  • Why is there more content on youtube in 4k then there is on cable, satellite, and digital tv combined?
    6·2 answers
  • Sendstars is a package delivering company that recently made a study on its customer retention and service renewal metrics. They
    8·2 answers
  • Part cost Calculator Modify the GUI in your program to look like the following GUI. To do that you need to add the following to
    13·1 answer
  • If a website ends with .gov does it mean that its written by the government or?
    11·2 answers
  • The term packet is used fairly generically to refer to protocol data unit (PDU). There are PDU equivalent names in the different
    15·1 answer
  • The Freeze Panes feature would be most helpful for which situation?
    6·1 answer
  • To break a text string into several lines, which means that the text string continues on the next line, the _____ character shou
    8·1 answer
  • Types in java are divided into two categories. the primitive types are boolean, byte, char, short, int, long, float and double.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!