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]
2 years 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]2 years 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
What is system accreditation?A. The process to specify secure communication between machinesB. Acceptance of test results that p
mylen [45]

Answer:

Option D is the correct option.

Explanation:

As recorded throughout the certification statement, system accreditation is the formal authorization for the application of a particular computer system in a particular system's environment.

So, in other words, System accreditation means that the formal approval of the configuration of the system specified.

4 0
3 years ago
Read 2 more answers
What is the best Photo editor? NEED ASAP! WILL MARK BRAINLIEST
Morgarella [4.7K]
Adobe photo editor is the best
4 0
3 years ago
Hi I m from India plz follow me and I will follow u​
erma4kov [3.2K]

Answer:

pok

Explanation:

4 0
3 years ago
Read 2 more answers
Timothy was reading tournament results of the football World Cup matches on Infogoalistic.com. As he was going through the resul
Gennadij [26K]

Answer:

B) contextual

Explanation:

Contextual advertising is a form of targeted advertising for advertisements appearing on websites or other media.

For example:

Timothy was reading tournament results of the football World Cup matches on Infogoalistic.com. As he was going through the results, an advertisement of new football studs popped up. This is an example of <u>contextual</u> advertising.

5 0
3 years ago
To print only the cells that you have selected, use the ________ command on the Print tab.
Llana [10]
Hold down the CTRL button and click where you want to print.
7 0
3 years ago
Other questions:
  • Where can information on metalworking occupations be found?
    14·2 answers
  • In server-side discovery pattern, load balancing and routing of the request to the service instances are taken care of by the se
    9·1 answer
  • What can be said about the equipment used by photographers during the Civil War?
    13·2 answers
  • Case 1-1Tom has just started working as an intern for a local radio station. He is responsible for managing the request line and
    8·1 answer
  • The premise of this exam is to synthesize your knowledge and understanding of recursion. Your synthesize may be in the form of a
    14·1 answer
  • What is the useful chart used for comparing values over categories?​
    8·1 answer
  • What is the benefit of making an archive folder visible in the Outlook folder list?
    6·1 answer
  • what is internet ?? mention five ways one can use the internet profitably. state five disadvantages of the internet.​
    13·1 answer
  • Which option lists the computer components in order from oldest to newest?.
    8·1 answer
  • Which code snippet is the correct way to rewrite this in Semantic HTML?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!