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

The function takes two string parameters; the first is the name of a file and the second is text. Complete the function to appen

d the string text onto the end of the file named filename. You'll want to open the file for appending and then you can use a single write function call to complete the write. Be sure that you close the file, either with an explicit close function call or by using a with statement.
Computers and Technology
1 answer:
castortr0y [4]3 years ago
3 0

Answer:

The code for the function is given below in Python language

Explanation:

def append_string_to_file(filename, text):// function takes the filename // and text  to append

f = open(filename, 'a')

f.write(text) //function part that writes the text

f.close() //closing the file using the explicit close function

You might be interested in
Which of the following is not an assessment of your fitness to drive
Ivan

Answer:

C. Am I carrying money?

Explanation:

The options are:

A. Am I awake and alert?

B. Am I emotionally sound?

C. Am I carrying money?

D. Am I physically able?

The correct option is certainly C. Am I carrying money? It can also be a concern if you are worrying since we don't have money. However, here its mentioned, we are not carrying, and it's not like we don't have money, and hence, it is not going to affect our mindset. Hence, it is not an assessment of anybody's fitness to drive.

3 0
3 years ago
Introduction or background of corporal punishment in schools
tensa zangetsu [6.8K]

Answer:

Corporal punishment is a discipline method in which a supervising adult, such as a teacher, deliberately inflicts pain upon a child in response to a child's unacceptable behavior or inappropriate language. The goals of this type of punishment are usually to halt the offense immediately, prevent it from happening again, and set an example for others.

3 0
3 years ago
How/when should you use student loans?
mote1985 [20]

Answer:

Things you should use your student loan to pay for: Books and supplies; Room and board (meal plans) Off-campus housing; Transportation (gas, bus pass, etc.) Computers; Any equipment you need for classes; Sheets and towels and Things you should not use your student loan to pay for: Pizza and beer for your roomies; Spring break travel; Taking your family out to dinner; Buying a new Mercedes; An outfit for a friend’s wedding; Cleaning services; Entertainment

Explanation:

3 0
2 years ago
Write a C++ function with the following signature: void readAndConvert() The function takes no parameters and returns no value.
shepuryov [24]

Answer:

The function is as follows:

void readAndConvert(){

   int n; string symbol,name;

   cin>>n;

   cin>>symbol;

   cin.ignore();

   getline (cin,name);

   vector<string> trades;

   string trade;

   for (int inps = 0; inps < n; inps++){

       getline (cin,trade);

       trades.push_back(trade);}

   

   cout<<name<<" ("<<symbol<<")"<<endl;

   for (int itr = 0; itr < n; itr++){

       string splittrade[3];        int k = 0;

       for(int j=0;j<trades.at(itr).length();j++){

           splittrade[k] += trades.at(itr)[j];

           if(trades.at(itr)[j] == ' '){

               k++;    }}

cout<<splittrade[2]<<": "<<floor(stod(splittrade[1]) * stod(splittrade[0]))<<endl;        }

   }

Explanation:

See attachment for complete program where comments are used to explain each line

Download cpp
4 0
2 years ago
Type the correct answer in the box. Spell all words correctly.
OleMash [197]

Answer:The page up and page down keys are sometimes called PgUp or PgDn and they are located on the right of the keyboard with page up on top and page down on the bottom. This short article about technology can be made longer.

Explanation:

3 0
3 years ago
Other questions:
  • Which of the following statements is false?
    10·1 answer
  • What is computer engineering?
    11·1 answer
  • This type of peripheral is used to interact with, or send data to, the computer.
    12·2 answers
  • (1) Prompt the user to input an integer between 32 and 126, a float, a character, and a string, storing each into separate varia
    7·1 answer
  • Driver’s License Exam The local driver’s license office has asked you to create an application that grades the written portion o
    9·1 answer
  • Which of the following is not considered a system component that can be found inside a computer? A-CPU B-RAM C-PCIe graphics ada
    6·1 answer
  • Describe at least one issue of terrorism that has happened recently.
    14·1 answer
  • 6.What does transgenic mean?​
    12·2 answers
  • QUICK HELP ME PLEASE
    9·1 answer
  • Creating a Numpy Array
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!