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
Machines may aid in making work easier over a longer distance. true or false.
Dmitry [639]
This seems like more of an opinion based question, but since they added "over a longer distance" If I were you I would go with false.
4 0
3 years ago
.....is used to save project in Visual basic .net from file menu
Harlamova29_29 [7]

Explanation:

I don't really understand what you're trying to get at, maybe try to abbreviate a little more?

4 0
3 years ago
4
kupik [55]

Answer:

the answer is D Smart Object

5 0
3 years ago
Read 2 more answers
Which type of network is the internet? choose the answer
Alex Ar [27]

Answer:

WAN or wide area network

Explanation:

The Internet is the most basic example of a WAN. It is connecting all computers together around the world.

5 0
3 years ago
Help me with this please
Ymorist [56]

Answer:

q1 chees

q2 web and digital continant

Explanation:

because haaa haaa haa dhum

7 0
3 years ago
Other questions:
  • Is there a way to get back old messages that you didn't mean to delete??? I have a Samsung S5 and I really really need help. I d
    11·2 answers
  • What is the purpose of application software policies?
    12·1 answer
  • The first few lines of a script that say "using" ... that point the code to the right groups are called
    11·1 answer
  • Communication of a message between two processes implies which of the following? (A) Synchronization (B) Atomic operation (C) Bl
    11·1 answer
  • Why is it a best practice of a remote access policy definition to require employees and users to fill in a separate VPN remote a
    14·1 answer
  • What is the most likely cause of a print job rendering the wrong colors on the output?
    14·1 answer
  • True/False/Unknown. For the interpretation of function calls, we assign the formal parametersto the valuations of the actual arg
    11·1 answer
  • Refers to the capacity to form bonds with particular
    11·2 answers
  • Discovery of a vulnerability in a software program can potentially be sold to the government. Group of answer choices True False
    9·1 answer
  • Which of the following declares an abstract method in an abstract Java class?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!