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
skad [1K]
3 years ago
15

"NOTE: write an algorithm, not a code" You are given a file called "std" and composed of "Number, Name, Address" fields. (You ca

n define the type of fields by yourself) Write an algorithm that makes "insert, delete, update and retrieve", processes on the records in the file. "Number" field is the key of each record. Here is the template of report: Steps Actions 1 Name of the report and date 2 Author of report 3. Literature review 4. Your contribution 5 Explanation algorithm and sub algorithms 6 Summary 7. Future advice 8. References
Computers and Technology
1 answer:
Inessa05 [86]3 years ago
5 0

Answer:

1. get the absolute path to the file

2. load the file as a table (dataframe in python)

3. to insert a row;

  • create a dataframe of the same field type
  • concatenate the new dataframe horizontally with the same dataframe

4. to delete a row, select and drop the row where the 'Number' field matches a value.

5. to update the values in row, use the number field as a key to replace the existing values.

6. print of save to a variable the rows where the number field matches a given value.

Explanation:

Follow the report template to create a report for the algorithm.

The algorithm gets the absolute path to the file and loads the file as a tabular file from there the data can be queried without accessing the main file. The insert algorithm creates a new dataframe and appends it to the main dataframe.

The delete, update and retrieve all use the same subalgorithm, getting the rows with the number field as the key value.

You might be interested in
For most general purpose processors, how does the operating system handle the situation when the processor is idle?
erica [24]

Answer:

The operating system handle this system idle situation by using the System Idle Process.

Explanation:

This system idle process constantly keeps the processor occupied means that the processor will not freeze when no processes are in work.When a process is using 12% of the CPU then 88% of the CPU is used by the system idle process.You can see this in the task manager of your windows.

5 0
3 years ago
What is the most efficient way to include a space after each paragraph
3241004551 [841]

To skip a line, then write the rest like this!


See? Good spacing, right?

4 0
3 years ago
The home keys on the numeric keypad are _____. 123 456 789 0+-
vovangra [49]

The home keys for the numeric keypad are 4 5 6

The fingers (Index, middle, and ring), on your right hand should always start on the 4 5 6 keys respectively. These keys are the home row keys for your numeric keypad. Each finger placed is responsible for a column of keys. For example, the middle finger is responsible for all the keys that lie in that column.


5 0
4 years ago
Read 2 more answers
Can someone take away your points
Julli [10]

Answer:

no why do you ask.. . ...........

7 0
3 years ago
The Payroll Department keeps a list of employee information for each pay period in a text file. The format of each line of the f
Oksi-84 [34.3K]

Answer:

In Python:

fname = input("Filename: ")

a_file = open(fname)

lines = a_file.readlines()

print("Name\t\tHours\t\tTotal Pay")

for line in lines:

eachline = line.rstrip(" ")

for cont in eachline:

 print(cont,end="\t")

print()

Explanation:

This prompts the user for file name

fname = input("Filename: ")

This opens the file

a_file = open(fname)

This reads the lines of the file

lines = a_file.readlines()

This prints the header of the report

print("Name\t\tHours\t\tTotal Pay")

This iterates through the content of each line

for line in lines:

This splits each line into tokens

eachline = line.rstrip(" ")

This iterates through the token and print the content of the file

<em> for cont in eachline: </em>

<em>  print(cont,end="\t") </em>

<em> print()</em>

5 0
3 years ago
Other questions:
  • How would you classify the earliest historical examples of STEM discoveries provided in this lesson?
    8·2 answers
  • 5. How do vector graphics used with CRT technology work? List at least one of vector graphics’ advantages over raster graphics,
    9·1 answer
  • What is the expected number of jacks-or-better cards in a five-card hand?
    10·1 answer
  • Basically, if for every row, the absolute value of the entry along the main diagonal is larger than the sum of the absolute valu
    10·1 answer
  • True or false: if we’re short side the subject in our composed frame, we have given the subject the maximum amount of “lead room
    15·1 answer
  • Can somebody tell me when is ps5 releasing???​
    15·2 answers
  • I really need help with this question
    14·1 answer
  • Which online article citation is correctly formatted according to MLA standards?
    15·2 answers
  • How to reset windows 7 password without logging in
    14·2 answers
  • (50 POINTS)
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!