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
beks73 [17]
2 years ago
15

Given an initialized variable fileName, write a sequence of statements that create a file whose name is given by the variable an

d whose content is a single line consisting of "This Is File: " followed by the name of the file. Make sure that the data written to the file has been flushed from its buffer and that any system resources used during the course of running these statements have been released.
Computers and Technology
1 answer:
steposvetlana [31]2 years ago
6 0

Answer:

In Python:

fileName = "myfile.txt"

fname = open(fileName, "w")

fname.write("This Is File: "+str(fileName))

fname.close()

Explanation:

This initializes fileName

fileName = "myfile.txt"

This creates the file in write mode

fname = open(fileName, "w")

This writes the required string to the file

fname.write("This Is File: "+str(fileName))

This closes the file

fname.close()

You might be interested in
Can Someone help plz?
Ugo [173]

Answer:

i dont understand sorry

Explanation:

7 0
3 years ago
It keeps saying “something is going wrong oops!” when i click on my brainly notifications what do I do
AveGali [126]

Answer:

check your app permissions it may be blocking them or try resetting the app

4 0
3 years ago
The principal objectives of computer security are to prevent unauthorized users from gaining access to resources, to prevent leg
Lena [83]

Answer:

True is the correct Answer for the above question.

Explanation:

  • Computer security is a security in which data of the computer is secured from the access of unauthorized users. It is primarily achieved to stop the access grant to the unauthorized user.
  • It means that there is an authorization point which decides that the user is authorized or not. If the user is authorized then only he can enter the system otherwise he can not able to enter the system.
  • It helps to secure the data and the data is the important point of the computer system.
  • The question also states the same which is described above. Hence true is the correct answer.

3 0
3 years ago
What is an embedded system. Give examples
IRINA_888 [86]

Answer:

An embedded system is a part of a larger system which has either one or a limited number of dedicated functions.

It doesn't require much power to run and is cheap to make and design.

Explanation:

Examples include: cars, microwaves, traffic lights, washing machines, phones etc

6 0
3 years ago
Which of the following type of software application would open a txt file
kogti [31]
I think that it's A or C
3 0
2 years ago
Read 2 more answers
Other questions:
  • Switches operate on what layer of the OSI Model
    11·1 answer
  • The ________ contains the central electronic components of the computer. select one:
    14·1 answer
  • What did do you do if you made a mistake on a computer?
    14·2 answers
  • A _______ template is used to maintain consistency in terms of margins and page numbers .
    6·1 answer
  • My father helps me more than helping my sister in Maths because I need more help to understand. This situation shows ___________
    11·1 answer
  • For a business that is properly using a social media information system, the system can
    13·1 answer
  • Which of these is a negative effect of computer technology's role in creating
    9·1 answer
  • Is monitor is a television​
    5·2 answers
  • What is the first phase of the project process?
    14·2 answers
  • Screen reading for extended periods can cause___________ _____________, so the position the monitor to minimize glare and give y
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!