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
Daily IT Question
lilavasa [31]

Answer:

D

Explanation:

You would not have to make a whole new set of punch cards if you knew the card that had the mistake. Simply remove this card from the pile and make a new punch card in its place.

6 0
3 years ago
Read 2 more answers
Practice Home Survey
Ksivusya [100]

Answer:

Since this is a survey without preparation, you can move ahead as you like. However, still, you need to figure out the attributes. Here you need to register plugged in hours for each of your family members. And the same thing is abbreviated as screen time as well. You need to make a table with two columns, a family member's name, and the screen time or plugged in time. And you are not required to do anything else, as the survey is the method of collecting the data. And it does not deal with the analysis. The analysis will be done, when you will sit as an analyst. And in fact, you are making this impromptu survey for the family head, who is in charge of your family which can be your father or mother or your grand father or grand mother. And they can use these details for various findings, like how can they reduce cable TV cost per month, and so on. Your job is to collect the accurate data. And same thing, you need to repeat for all the survey that you are asked to conduct. Always remember, you need to know what data you need to collect through a survey. Plan for the survey only after finding the complete details about this. And even when asked to conduct as unprepared, this knowledge is essential.  

Explanation:

Please check the attachment.

5 0
4 years ago
What is a computer OPERATING SYSTEM?
Alex17521 [72]

Answer:

A computer OPERATING SYSTEM is a system software that manages computer hardware, software resources, and provides common services for computer programs.

Explanation:

5 0
4 years ago
What would you use to exit from a for each activity and continue the execution of the workflow?
mr_godi [17]

Answer:

Break activity

Explanation:

The Break activity simply allows a user to stop the loop at any point chosen, and then continue with another activity or the next activity.

4 0
3 years ago
Then create a new Java application called "StringSlicer" (without the quotation marks) that uses methods to:
anyanavicka [17]

Answer:

See the explanation section

Explanation:

import java.util.*;

//The above statement is to import the Scanner and ArrayList class

public class StringSlicer {

   public static void main(String args[]) {

   Scanner scan = new Scanner(System.in);

   System.out.println("Enter your string: ");

   String inputString = scan.nextLine();

   

   ArrayList<Character> stringList = new ArrayList<Character>();

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

           stringList.add(inputString.charAt(i));

       }

       

   for(Character letter: stringList){

           System.out.println(letter);

       }

   }

}

5 0
4 years ago
Other questions:
  • An electronic resume is a plain-looking document. True of False?
    6·2 answers
  • Which structure does a web page normally use to define an area of focus?
    8·1 answer
  • Why was the term personal computer created?
    5·1 answer
  • Which of the following statements is TRUE?
    11·2 answers
  • A(n) _____ can be used to reveal a competitor’s program code, which can then be used to develop a new program that either duplic
    9·1 answer
  • The variable most_recent_novel is associated with a dictionary that maps the names of novelists to their most recently published
    12·1 answer
  • 19. Fair use applies to which of the following situations?
    14·1 answer
  • In this progress report, you will be focusing on allowing one of the four transactions listed below to be completed by the user
    14·1 answer
  • What are the components of a web page???
    9·2 answers
  • What is the main coding language for netflix?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!