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
Information gathered from observing a plant grow 3 cm over a two-week period results in _______.a. inferences. b. variables. c.
Leya [2.2K]

Answer:

The answer is d. Data

Explanation:

information gathered from observing a plant grow 3 cm over a two-week period results in Data

data is facts and statistics collected together for reference or analysis.

Data is any information that has been collected, observed, generated or created to validate original research findings

6 0
4 years ago
Choose the response that best completes the following statement.
slava [35]

Answer:

consider the outcome

Explanation:

7 0
3 years ago
When you connect a new hardware device to your computer, the operating system uses a feature called _______ so you can use the n
dalvyx [7]

Answer: Plug and play

Explanation:

Adding a new hardware to the computer activate the plug and play module of the operating system which installs the hardware device into the computer and enables us to use it immediately.

6 0
3 years ago
Please help What two Boolean operators can you use to narrow your search results?
daser333 [38]

Answer:

if and and not and or ans all

7 0
3 years ago
Match the definition
Katen [24]

Answer:

¿???????????? SORRY..........

8 0
3 years ago
Other questions:
  • It's time for you to schedule a dental checkup. The responsible thing to do is to ___
    11·1 answer
  • 4. What aspect of the initial database planning process would the formula (0 + Pt × 3 + p)/5 be used in?
    5·1 answer
  • Write a function called median, that takes as parameter a full, sorted array of doubles and returns the median of the list. For
    15·1 answer
  • Another html/css assignment, drop css code below, thank you
    15·1 answer
  • Write a shell script called SpellOutDate that prints the detail of the current date in separate lines. For example if the curren
    13·1 answer
  • What is network hardware?
    10·1 answer
  • 11)When, if ever, will the geometric average return exceed the arithmetic average return for a given set of returns?A) When the
    6·1 answer
  • Which of these would NOT be a valid Internet Control Message Protocol (ICMP) error message:
    6·1 answer
  • Here is the model I’m working on and can’t figure it out this model shows the basic process of making a protein what are the str
    14·2 answers
  • AYUDAAA ESPARA HOYYY
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!