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
Elena-2011 [213]
3 years ago
13

4.17 LAB: Data File A comma separated value (.csv) file has been included to be used for this program. Each line contains two va

lues, a name and a number separated by a comma (except the first line, which contains the titles for the value types). The name is that of a writer and the number refers to the number of works the writer has written. Ex. Jane Austen,6. Each line is an entry and each entry number can be updated by identifying the associated name. Once complete, the following program opens data file allWorks.csv and asks if the user wants to update entries or add new entries. All entries are stored in an array while being read in and updated. The program then writes the array to the file, overwriting the original contents. The following TODO sections must be completed. Open allWorks.csv for reading/input. Locate an entry to be updated by name (use the Java String indexOf() method) Add a new entry if the name isn't found in the file (give the entry a new number) Open file allWorks.csv for output Write contents of the array to allWorks.csv (original file is overwritten)
Computers and Technology
1 answer:
Andrej [43]3 years ago
7 0

Answer:

import csv

def Csvreader(filename):

   with open("filename", "r") as file:

   content = file.csv_reader()

   list_content = list(content)

   file.close

   return list_content

Explanation:

This is a python description of the function that reads the csv file and converts it to a list, from the list, each item can accessed with its index and updated directly. Use this to draw the same conclusion for a java program.

You might be interested in
Use Python programming (or Excel) to analyze and plot a real equilibrium sedimentation equilibrium experiment. The data are from
Nady [450]

Answer:The allosteric inhibitors of integrase (termed ALLINIs) interfere with HIV replication by binding to the viral-encoded integrase (IN) protein. Surprisingly, ALLINIs interfere not with DNA integration but with viral particle assembly late during HIV replication. To investigate the ALLINI inhibitory mechanism, we crystallized full-length HIV-1 IN bound to the ALLINI GSK1264 and determined the structure of the complex at 4.4 Å resolution. The structure shows GSK1264 buried between the IN C-terminal domain (CTD) and the catalytic core domain. In the crystal lattice, the interacting domains are contributed by two different dimers so that IN forms an open polymer mediated by inhibitor-bridged contacts; the N-terminal domains do not participate and are structurally disordered. Engineered amino acid substitutions at the inhibitor interface blocked ALLINI-induced multimerization. HIV escape mutants with reduced sensitivity to ALLINIs commonly altered amino acids at or near the inhibitor-bound interface, and these substitutions also diminished IN multimerization.

Explanation:

6 0
3 years ago
How do you ask brainy a question without it not liking the question and saying it hurts their feelings?
murzikaleks [220]
IM SORRY but i dont now your question

7 0
3 years ago
Select the correct answer from each drop-down menu.
ratelena [41]

Answer:

hmm its unneeded files and programs ig..

6 0
3 years ago
(20 POINTS) <br> What is one risk of introducing your new information system? Why is it a risk?
mixas84 [53]
Hardware and software failure - such as power loss or data corruption.
8 0
3 years ago
Write a recursive method named binarySearch that accepts a sorted array of integers and an integer target value and uses a recur
djyliett [7]

Answer:

10

-1

Process finished with exit code 0

Explanation: see code bellow

public class BinarySearchRecursive {

   public static int binarySearch(int[] a, int key) {

       return binarySearchRecursiveHelper(a, key, 0, a.length - 1);

   }

   public static int binarySearchRecursiveHelper(int[] arr, int target, int start, int end) {

       if (start > end) {

           return -1;

       }

       int mid = (start + end) / 2;

       if (arr[mid] == target) {

           return mid;

       } else if (target < arr[mid]) {

           return binarySearchRecursiveHelper(arr, target, start, mid - 1);

       } else {

           return binarySearchRecursiveHelper(arr, target, mid + 1, end);

       }

   }

   public static void main(String[] args) {

       int[] a = {-4, 2, 7, 10, 15, 20, 22, 25, 30, 36, 42, 50, 56, 68, 85, 92, 103};

       int index = binarySearch(a, 42);   // 10

       System.out.println(index);

       index = binarySearch(a, 66);   // -1

       System.out.println(index);

   }

}

6 0
3 years ago
Other questions:
  • A software programâs _________ indicates what can legally be done with that program.]
    5·1 answer
  • An associate is seeking advice on which device to purchase for a friend who is a business owner. The friend needs the ability to
    13·1 answer
  • What is contrast (in Photography)?
    14·1 answer
  • a) Write out an abstract class to represent a ball. Include data fields to store the weight of the ball as a double value and th
    6·2 answers
  • A keyboard shortcut to pasting in a document is to key _____.
    8·1 answer
  • Explain what this program is doing ​
    15·1 answer
  • Which option should you select to ignore all tracked changes in a document? To ignore all tracked changes in a document, you sho
    14·1 answer
  • Do you think the current video game industry is likely to experience another “crash” (similar to the one in the 1980s) any time
    10·1 answer
  • What could be done to make sure that people follow copy right laws?
    13·2 answers
  • Which of these sentences correctly shows how youngsters use the Internet?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!