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
Using C#, declare two variables of type string and assign them a value "The "use" of quotations causes difficulties." (without t
stich3 [128]

Answer:

Let the two string type variables be var1 and var2.  The value stored in these two variables is : The "use" of quotations causes difficulties.

  • The variable which uses quoted string:

          string var1 = "The \"use\" of quotations causes difficulties.";  

  • The variable which does not use quoted string:

string var2 = "The " + '\u0022' + "use" + '\u0022' + " of quotations causes difficulties.";

  • Another way of assigning this value to the variable without using quoted string is to define a constant for the quotation marks:

const string quotation_mark = "\"";

string var2 = "The " + quotation_mark + "use" + quotation_mark + " of quotations causes difficulties.";

Explanation:

In order to print and view the output of the above statements WriteLine() method of the Console class can be used.

   Console.WriteLine(var1);

   Console.WriteLine(var2);

In the first statement escape sequence \" is used in order to print: The "use" of quotations causes difficulties. This escape sequence is used to insert two quotation marks in the string like that used in the beginning and end of the word use.

In the second statement '\u0022' is used as an alternative to the quoted string which is the Unicode character used for a quotation mark.

In the third statement a constant named  quotation_mark is defined for quotation mark and is then used at each side of the use word to display it in double quotations in the output.

8 0
3 years ago
What dynamic would best describe the genre of rock and roll?
Ainat [17]
Popular music characterized by vocals, hardback beat , loud volume and electric guitar :))) I really hope that helped if not let me know! :) <span />
3 0
3 years ago
When you send an email how many computers does it go to
Xelga [282]

once you have sent the email it will only go to the server which then the person receiving it would log on therefore requesting the emails recived.

I'm not 100% sure my answer is classed as correct but I would say it doesn't go to a computer it just gets stored on a server in till requested

4 0
3 years ago
Which of the following applies to a DNS caching server? (Choose all that apply.)
Alborosie

Answer:

The answers are:  it is used to enable fast DNS queries and  It can help reduce the amount of network traffic generated by DNS servers.

Explanation:

Because a DNS server can resolve a query from tis local data sends a recursive qyery to a root server.

3 0
3 years ago
And informative subject line is necessary for a good email true or false​
Yuki888 [10]

True.

A conscise and informative subject line is necessary for a good email. The subject line should give the receiver a good idea what the topic is of the email. An informative subject line also helps the recipient to identify the email as an important message and not spam.

7 0
3 years ago
Other questions:
  • Explain how the principles underlying agile methods lead to accelerated development and deployment of software.
    6·1 answer
  • Which is an example of correct HTML?
    10·1 answer
  • Design a program that asks the user to enter a store’s sales for each day of the week. The amounts should be stored in an array.
    10·1 answer
  • The page orientation in which the page width is greater than the page height is called
    8·1 answer
  • Which of the following is the fastest way to open an Access database? a. Right-click the database icon. b. Start Access from the
    13·2 answers
  • To generate a report with exact results based on specific criteria it is best to base the report on a(n) ____________________ cr
    6·1 answer
  • Window frame will expand to fill the entire desktop when you
    12·1 answer
  • Similarities between inline css and internal css​
    6·1 answer
  • Phil wants to make a dark themed superhero movie. What could be his target demographic
    11·2 answers
  • What is output?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!