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]
2 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]2 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]2 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
? Assessment
Ksivusya [100]

Answer:

Her performance over the course of  a season.

Explanation:

An athlete is signed for a season. These days each aspect of an athlete is noted through the effective use of the best technology. However, for detailed study, one or several plays, and certainly not the second half of a game is enough. It's required to collect the details for a complete season. And that is possible, as an athlete is hired for a season. And through such a detailed data set of a complete season, we can now train a machine as well, and it will let the athlete know where she is going wrong. And thus she can improve and remove those faults from her game, and become a better athlete. And even for a coach, one complete season is required, though when he has not seen her playing before that season. It's assumed that this is her first season. All the options mentioned are good, but the best is certainly the one with complete details, and that is a complete season. The rest is good but not the best.

4 0
3 years ago
Which button could Pamela press in the Microsoft Word spell checker to make the word “colour” instantly change to “color” whenev
Savatey [412]
One step is to right click on the word to add it to her personal dictionary. or, <span><span>Press F7. Word starts the spelling and grammar checking utility. </span><span>Make corrections, as appropriate, when prompted.
</span></span>

However, one can create a macro that would do the conversions :

1) Identify a list of words whose spelling you want to convert.2) Turn on the macro recorder. 3) Use the Replace feature to replace the spellings.4) Turn off the macro recorder.

The macro will do a conversion from one to the other. Later, as we have more words that need to be automatically replaced, we can just edit the macro and add those words.

8 0
3 years ago
What option is available on a Host A record to tell the system how long the record should remain in the database after it was cr
lapo4ka [179]

Answer:

Time to live.    

Explanation:

The Time to Live is used for the purpose of the expiration table in the rows dynamically.The Time to live is represented in the time limit to stay in the database the Time to live It is no longer possible to fetch the data that has passed its closing timeout value also it is not displayed in the store metrics.

The Time to live is available on the host in the log informing the system how long the record will stay in the database after it has been generated or last modified.

8 0
3 years ago
List any two different between primary memory and secondary memory.​
nikitadnepr [17]

Answer:

Primary memory is directly accessible by Processor/CPU. Secondary memory is not directly accessible by the CPU. ... The memory devices used for primary memory are semiconductor memories. The secondary memory devices are magnetic and optical memories

3 0
3 years ago
Read 2 more answers
The source must decode a message before it can be sent. select one: <br> a. True <br> b. False
Pani-rosa [81]
True because that's what i said it is 
5 0
3 years ago
Other questions:
  • What file would you edit to restrict the number of simultaneous logins a user can employ??
    14·1 answer
  • With which network connection type does the vm obtain ip addressing information from its host?
    11·1 answer
  • Which two fields in an Ethernet frame help synchronize device communica- tions but are not counted toward the frame’s size?
    11·1 answer
  • Consider the classes below: public class TestA { public static void main(String[] args) { int x = 2; int y = 20 int counter = 0;
    8·1 answer
  • Assume we are testing a variable is_sunny in a while loop. is_sunny = “n”.
    13·1 answer
  • Define the following term. data, database, DBMS, database system, data- base catalog, program-data independence, user wen', DBA,
    12·1 answer
  • A list is a collection that ______________
    9·1 answer
  • Ethan wants to change the font in his document. He should _____.
    8·1 answer
  • LIST THE 7 BEST PROGRAMMING MOVIES 2020-2021.
    9·1 answer
  • Which of the following is true?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!