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
podryga [215]
3 years ago
14

Create a script that prompts for the user to input a directory and then prints out the number of sub-directories in the given di

rectory, as well as the number of files (use the numbers only for the directory given, you do NOT need to do this recursively for all sub-directories).
Computers and Technology
1 answer:
laila [671]3 years ago
5 0

Answer:

Below is the required code:

Explanation:

Python Code

import os

import bin

dir = input("Please specify the location to the directory")

list = os.walk(dir)

a = length(list[1])

b = length(list[2])

print "Files: %n , Sub-dirs : %n" % (b,a)

decision = _(" Do you want to continue? (y/n) "))

if(decision):

cls

else :

exit()

You might be interested in
Which option ensures that page break is automatically inserted ahead of a specific paragraph or heading?
xxTIMURxx [149]

Answer:

The "Page breaks before" option is the correct approach.

Explanation:

  • This attribute specifies whether such a page interruption could perhaps appear just before any component to something which applies.
  • This says that you would like this particular section to succeed at the beginning of that same page, irrespective of what it's about, they are being used for paged multimedia, for example, printed publications and otherwise texts or paperwork.
7 0
3 years ago
Laura is confused with the spelling of the word pronunciation. She types the word pronunciation. Which feature of the auto corre
larisa [96]
I think this answer is b
5 0
3 years ago
Read 2 more answers
Is there a way for me to play a .mp3 file from my computer using Atom?
krek1111 [17]

They have a sound package. More info here: https://atom.io/packages/sound

7 0
3 years ago
Which type of computer serves as the heart of the computing systems for many, perhaps most, major corporations and government ag
Nezavi [6.7K]

Answer:

Mainframes

Explanation:

Mainframes are utilized by many major corporations and government agencies. They are also used in banking, accounting, and healthcare to name a few.

4 0
3 years ago
Which is a benefit of using the Paste Link option?
Sergeeva-Olga [200]
Repost with the answer choices buddy
8 0
3 years ago
Other questions:
  • Colleen is creating a document with two minimal paragraphs of text comparing two business models for her company. She decides to
    14·2 answers
  • An administrator needs to make sure that video conferencing is allocated a high portion of bandwidth within a company network. W
    11·1 answer
  • A __________ is when the sender cryptographically marks a message with its private key, which is achieved by a cryptographic alg
    12·1 answer
  • Which of the following answers refers to a system containing mappings of domain names to various types of data, such as numerica
    15·1 answer
  • An empty frame used to reserve space for a picture to be inserted at a later time is known as a _____. shape image picture place
    7·1 answer
  • Wireless networks use radio frequency (RF) or radio techniques, which allows wireless transmissions to reach out in all directio
    6·1 answer
  • Write multiple if statements: If carYear is before 1967, print "Probably has few safety features." (without quotes). If after 19
    11·1 answer
  • Howard’s In The Process Of Creating A Google Display Campaign And Decides To Use Custom Intent Audiences As A Targeting Option.
    5·1 answer
  • Pleaseeeeeeee tellllllllllllllllllllll​
    8·1 answer
  • Select the correct answer from the drop-down menu.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!