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
Licemer1 [7]
2 years ago
6

The create_python_script function creates a new python script in the current working directory, adds the line of comments to it

declared by the 'comments' variable, and returns the size of the new file. Fill in the gaps to create a script called "program.py". 1- def create_python_script(filename): 2 comments = "# Start of a new Python program" with open("filename", "w+") as file: file.write(comments) import os filesize - os.path.getsize(filename) print("The size of the file is:") return(filesize) Reset 3 4 5 6 7 Run 9 10 11 print(create python script("progran.py"))
Computers and Technology
1 answer:
Vika [28.1K]2 years ago
6 0

Answer:

import os

def create_python_script(filename):

   comments = "# new python script file"

   with open(filename,"w+") as file:

       file.write(comments)

   filesize = os.path.getsize(filename)

   print(f"The size of the file is: {filesize}")

create_python_script("program.py")

Explanation:

The os module is a built-in python file that is used to interact with the operating system terminal. The with keyword is used to create and open a file with write privileges with no need to close the file.

The path.getsize() method is used to get the size of the newly created file which is printed in the console.

You might be interested in
What tool is included with windows 8 that will help you connect to the directaccess server when you have problems and can be use
Elina [12.6K]
None that I know. Many third party apps.
4 0
3 years ago
Your friend wants to know about Microsoft Expression Web 4.
Vlad [161]
Microsoft Expression Web 4 is 
--
Component of Expression Studio
--
Design and Develop Web Pages using HTML5, CC3, ASP.Net, and more
--
Requires .Net Framework & Silverlight 4.0
--
3 0
3 years ago
What sorts of routine, seemingly unimportant information would help you learn about or break into another company’s network?
tatuchka [14]

Answer and Explanation:

  • Reboot your Computer from which you need to break into.
  • With your remote Ethernet card embedded and the unprotected passageway will mate up in a flash. You likewise need to change the Service Set Identifier (SSID) on your Ethernet card to coordinate SSID on the system's passage. You can decide to physically constrain your DHCP settings to reestablish, however on the off chance that that gives you any trouble.we need to re-boot it.
  • The Third Man ran a sniffer program that caught the majority of the LAN traffic within this organization. It was transmitted through the remote passageway straight into the Third Man's PC. Passwords. Agreements. Email.
4 0
3 years ago
Keep a log of the different types of communication activities in which you engage during the rest of the day. Categorize each ac
baherus [9]

There are 4 different types of communication and I can share my experience by helping you out to solve the assignment.

Explanation:

1. Verbal Communication:

  • Communication with voice
  • Provides active listening
  • Body language is equally important.

2. Non-Verbal:

  • Body language is the most important
  • Communicating without using the words

3. Visual communication:

  • Listening contents through photos and videos

4. Written communication:

  • Serves as record
  • Does not require tone

So in day today aspect we come across almost all type of communication. To answer the discussed question

1. Did the variety of communication surprised you?

I would say yes. I can say unknowingly I have experienced various types.

2. Did you find that your were more involved in one type of communication?

I would say yes. People may like communication type depending on their interest and skill set. So according to me even I have involved in my life with one set of communication and I am trying to use it more.

3. Which one(s) is/are most involved?

So it differs from people to people. I like verbal communication, because I am good at speaking with good tone and voice. Also, I am attracted towards visual communication because one picture will talk more than what an essay would communicate.

6 0
3 years ago
Which of the following could have a negative impact a planned route?
Nata [24]

Answer:

B

Explanation:

8 0
3 years ago
Other questions:
  • Normal view
    10·2 answers
  • A(n ____ is a named group of formatting characteristics.
    7·1 answer
  • Match the academic requirements with the careers. Technical program , bachelors degree, doctorate degree can go with cosmetologi
    7·2 answers
  • Helping people keep track on things is the purpose of_____ A database B table C query D form​
    12·1 answer
  • What are paragraphs separated by
    9·1 answer
  • Consider the following statements: #include #include class Temporary { private: string description; double first; double second;
    9·1 answer
  • when working with smart which tab would provide the ability to change the shape or size of the smart art shapes
    15·2 answers
  • Which storage is faster than secondary storage​
    14·2 answers
  • Identify a statement that accurately differentiates between short-term memory and working memory.
    15·1 answer
  • Please solve this in JAVA<br><br> Please see the attachment
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!