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
WHO WANTS TO PLAY AMONG US
Elza [17]

Answer:

Explanation:

ME

8 0
3 years ago
Read 2 more answers
Por favor definir que es un pseudocódigo y que es un diagrama de flujo.
marusya05 [52]

Answer:

que

Explanation:

8 0
3 years ago
Read 2 more answers
The value 8/10 in a cell refers to which of these?
AleksAgata [21]
D. all of these, since it depends on how the cell is formatted.
8 0
4 years ago
Read 2 more answers
The tcp protocol provides error detection and correction. <br><br> a. True <br> b. False
ANEK [815]
B. False

Explanation

TCP provides reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network.
4 0
2 years ago
I WILL GIVE BRAINLIEST
Lostsunrise [7]

Answer:

i know but you to help me ok this answer b

3 0
3 years ago
Other questions:
  • Jeff needs to apply a theme and change the font of the theme in the presentation that he is making. Put the steps in the order t
    14·1 answer
  • What is the seventh byte in the roller coasters file?
    12·1 answer
  • Network administrators ____ to set up the browsers on the network to use a proxy server.
    12·1 answer
  • Please help will mark brainiest
    8·1 answer
  • When tcp/ip was developed, the host table concept was expanded into a hierarchical name system for matching computer names and n
    5·1 answer
  • A type of cpu socket, used with modern intel processors, where the cpu itself has no pins but the contact pads of the cpu line u
    8·2 answers
  • 1. The global economy involves trading between people from different _____
    8·1 answer
  • Help me with this, please. Are vacuum cleaners, Cd players, and telephones considered computers? Do they store any data or proce
    8·2 answers
  • What steps can be used to password-protect a worksheet?
    14·1 answer
  • Why do we need operating systems?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!