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
VladimirAG [237]
1 year ago
13

Write an application that allows a user to enter a filename and an integer representing a file position. Assume that the file is

in the same folder as your executing program. Access the requested position within the file, and display the next 10 characters there.
Computers and Technology
1 answer:
hodyreva [135]1 year ago
8 0

The program is an illustration of file manipulations, where files are accessed, read and modified

<h3>The main program</h3>

The program written in Python, where comments are used to explain each action is as follows;

#This gets the file name

fname = input("Enter file name: ")

#This gets an integer value

num = int(input("Integer: "))

#This opens the file

file = open(fname, 'r')

#This initializes the number of characters to 0

count = 0

#This begins an iteration

while 1:

# This prints each character

print(file.read(1))

#This increases the number of characters printed by 1

count+=1

#When 10 characters are printed

if count == 10:

    #This closes the iteration

 break

#This closes the file

file.close()

Read more about file manipulations at:

brainly.com/question/16397886

You might be interested in
CPU BENCHMARKS are measurements used to compare performance between processors
Troyanec [42]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

CPU benchmarks are used to picking the best CPU. If you want to pick the best CPU for the kind of work you do is easier if you research some performance benchmarks.

As you know, CPU benchmarks are measurements used to compare performance between processors. These benchmarks are the measure to know the performance of CPU.

These CPU Benchmarks are generated by running software programs specifically designed to push the limits of CPU performance.

3 0
3 years ago
Which of the following identifies the patterns used for each data series in a chart?
Lady_Fox [76]
The answer is A)Legend.
7 0
3 years ago
Select the correct answer. Matt works for an advertising agency. He is often involved in the designing and development processes
Rus_ich [418]

Answer:

MAY BE A

Explanation:

I THINK A IS THE CORRECT ANSWER

8 0
3 years ago
Read 2 more answers
What is the only language a microprocessor can process directly but most programmers almost never write programs in this code?
Phantasy [73]
Assembly language, a.k.a. machine language.
6 0
2 years ago
Can someone please do this java lab for me (100 point version)? Heres the link: https://www.dropbox.com/sh/a639urhsggss051/AADdn
nlexa [21]

Answer:

não entendi DESCULPA kkkk

8 0
3 years ago
Other questions:
  • The Freemont Automobile Factory has discovered that the longer a worker has been on the job, the more parts the worker can produ
    11·1 answer
  • A network administrator receives a call from the sales department requesting ports 20 and 21 be opened on the company’s firewall
    12·1 answer
  • True or False. When used with the cout object, the endl stream manipulator advances the cursor to the next line on the computer
    6·1 answer
  • An organization is trying to decide which type of access control is most appropriate for the network. The current access control
    12·1 answer
  • Find the inverse function of f(x)= 1+squareroot of 1+2x
    6·1 answer
  • What are wizard ranks in brainly​
    13·2 answers
  • How are satellite radio, Internet radio, and podcasting different?
    11·1 answer
  • How can I download music and films at home without breaking the law?
    11·2 answers
  • State five differences between Dos and Windows.​
    14·1 answer
  • Which of the following terms refers to the cells that contain values and labels to be graphed in the chart?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!