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
In the __________ Standard, chemical manufacturers, importers, and distributors are required to provide hazard information by wa
Bas_tet [7]
The correct answer is C
5 0
3 years ago
You are reviewing the style sheet code written by a colleague and notice several rules that are enclosed between the /* and */ c
Flauer [41]

Answer:

Nothing will happen.

Explanation:

The rules written between /* and */ will be ignored because /* and */ are the standard way of writing comment in a style sheet code. So, whatever fall in between them will be ignored during rendering of the page.

7 0
3 years ago
In a Web-based database, middleware is used to transfer information from the organization's internal database back to the Web se
Viefleur [7K]

Answer: True

Explanation:

 Yes, the given statement is true that the web based database used the various types of database applications for transferring the information or data.

  • The web database applications are basically designed so that the users managed and easily access the information by using the internet.
  • It is works as the middleware form for transferring the data from the internal database of an organization to the web server and it is known as web page for the user interface.
  • We can store various types of business and also personal related data by using the web database.

4 0
3 years ago
4.3 mini programs AP computer science
allochka39001 [22]

1.

name = input("Enter your name: ")

num1 = int(input("Hello "+name+ ", enter an integer: "))

num2 = int(input(name+", enter another integer: "))

try:

   if num1 % num2 == 0:

       print("The first number is divisible by the second number")

   else:

       print("The first number is not divisible by the second number")

except ZeroDivisionError:

   print("The first number is not divisible by the second number")

try:

   if num2 % num1 == 0:

       print("The second number is divisible by the first number")

   else:

       print("The second number is not divisible by the first number")

except ZeroDivisionError:

   print("The second number is not divisible by the first number")

2.

import random, math

num1 = float(input("Enter a small decimal number: "))

num2 = float(input("Enter a large decimal number: "))

r = round(random.uniform(num1, num2), 2)

print("The volume of a sphere with radius " + str(r) + " is " + str(round(((4 / 3) * math.pi * (r ** 3)), 2)))

I hope this helps!

8 0
3 years ago
Software that communicates with the hardware and allows other programs to run. It is comprised of system software, or the fundam
alukav5142 [94]

Answer:An operating system, or "OS," is software that communicates with the hardware and allows other programs to run. It is comprised of system software, or the fundamental files your computer needs to boot up and function.

Explanation:

8 0
2 years ago
Other questions:
  • Describe the general process of creating a DataFlow Diagram (DFD)
    7·1 answer
  • The arithmetic logic unit (alu) controls all of the functions performed by the computer's other components and processes all the
    7·1 answer
  • A game’s ______ is what contains its directions and calculations; some refer to it as the “engine” that drives the game.
    12·1 answer
  • The control programs managing computer hardware and software perform the _________ function to control and prioritize tasks perf
    8·1 answer
  • Graphs and charts are two different elements. True or False
    15·1 answer
  • Which technology is predominately used for contactless payment systems?
    11·1 answer
  • Sandra is having difficulty with her reading assignment because she does not fully understand the language. Which online tool wo
    6·1 answer
  • Difference between automated testing and manual testing
    13·1 answer
  • Requests to retrieve data written in a language such as SQL are called…
    8·1 answer
  • The ______ process retains copies of data over extended periods of time in order to meet legal and operational requirements.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!