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
irga5000 [103]
4 years ago
13

Assume that the myname.txt file is currently closed. write the code segment that opens the file without erasing it, write anothe

r name to the file so that it is appended to the end of the file's existing data, and close the file.
Computers and Technology
1 answer:
tatiyna4 years ago
8 0
#Python3

outFile = open( "myname.txt", 'a' )
outFile.write( anotherName )
outFile.close()

You might be interested in
File Sales.java contains a Java program that prompts for and reads in the sales for each of 5 salespeople in a company. It then
myrzilka [38]

Answer:

import java.util.Scanner;

public class Sales

{

public static void main(String[] args) {

   

    int sum;

    Scanner input = new Scanner(System.in);

   

    System.out.print("Enter number of salespeople: ");

    int salespeople = input.nextInt();

    int[] sales = new int[salespeople];

       

    for (int i=0; i<sales.length; i++)

    {

     System.out.print("Enter sales for salesperson " + (i+1) + ": ");

     sales[i] = input.nextInt();

    }

    System.out.println("\nSalesperson   Sales");

    System.out.println("--------------------");

    sum = 0;

       int maxSale = sales[0];

       int minSale  = sales[0];

       int minId=1;

       int maxId=1;

    for (int i=0; i<sales.length; i++)

    {

               System.out.println("     " + (i+1) + "         " + sales[i]);

 sum += sales[i];

  if(maxSale < sales[i])

           {

               maxSale = sales[i];

               maxId = i+1;

           }

           if(minSale > sales[i])

           {

               minSale = sales[i];

               minId = i+1;

           }

   }

System.out.println("Total sales: " + sum);

       System.out.println("The average sale is: " + sum / salespeople );

       System.out.println("Salesperson "+ maxId + " had the highest sale with "+ maxSale + ".");

       System.out.println("Salesperson "+ minId + " had the lowest sale with "+ minSale + ".");

       

       int amount = 0;

       int counter = 0;

       System.out.print("Enter an amount: ");

       amount = input.nextInt();

       for (int i=0; i<sales.length; i++)

    {

     if(sales[i] > amount) {

         counter++;

         System.out.println("Salesperson "+ (i+1) + " exceeded given amount. (Number of sales: " + sales[i] +")");

     }

    }

       System.out.println("Number of salespeople exceeded given amount is: "+ counter);

}

}

Explanation:

- Ask the user for the number of salesperson

- According to entered number, create an array called sales to hold sale number for each person

- In the first for loop, assign the given sales numbers

-  In the second for loop, print all the sales people with sales, calculate the total sales. Also, find the minimum and maximum sales numbers with associated individuals.

- Print total, average, highest, and lowest sales.

- Ask user enter an amount

- In the third for loop, find the sales people who exceeded this amount.

- Print number of sales people who exceeded the amount.

8 0
4 years ago
Ethan is a project manager who is responsible for overseeing overall budget and schedule. Which tool is he is MOST likely to use
pashok25 [27]

Explanation:

55fhfhsgghzmjfgjkosh gyspfwfogywswgiwzy

8 0
3 years ago
Software piracy is acceptable as it helps us obtain software cheaper or sometimes even for free.
mr Goodwill [35]

Answer:

1: false because it's just scams

2: true

Explanation:

3 0
3 years ago
Physical safeguards, also called logical safeguards, and are applied in the hardware and software of information systems.
Nitella [24]

Answer:

False

Explanation:

They are not applied in the hardware and software of information systems.

3 0
3 years ago
11. How much time will you save on a
matrenka [14]

Answer:

Less than 1 min, so A.

Explanation:

Hope this helps!

( it really does help you save)

7 0
4 years ago
Other questions:
  • Suppose sum and num are int variables, and the input is 18 25 61 6 -1
    11·2 answers
  • “When using a public computer for browsing the Internet, try to use for 1.________ transactions. Also, use 2.__________ browsing
    10·2 answers
  • "Two technicians are discussing FWD driveshaft service. Technician A says that removal of the driveshaft usually requires partia
    15·1 answer
  • A(n) ____ is a logical grouping of several data files that store data with similar characteristics.
    8·1 answer
  • Write down the complete AJAX code to avoid page caching.
    6·1 answer
  • central, secure database in which Windows stores hardware and software configuration information and system security policies is
    12·1 answer
  • When the amount of storage data is big, and we need the searching and insertion must be very fast, which kind of data structure
    9·1 answer
  • As a basic user of SAP Business One, which feature of the application do you like most? Elaborate on your answer.
    15·1 answer
  • Who is responsible for developing the physical background for the characters by creating buildings, landscapes, and interiors?
    14·1 answer
  • Please answer this question​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!