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
Python full code not displaying<br>only hello prints
tankabanditka [31]
From the code you posted, there is no function call to vendingMachine()

Try at the top of your code:

print ("hello")
vendingMachine()

def vendingMachine():
...
5 0
3 years ago
What tool allows you to search external competitive intelligence research?
enot [183]

Answer:

SocialPeta

Explanation:

4 0
2 years ago
Tom's Art Supplies used to sell art supplies through mail order catalogs, but the company's order takers often had difficulty de
olganol [36]
The answer is:bbbbbbbb
6 0
3 years ago
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
__________for about 10 minutes in between each repetition session helps you to remember the information better. a. Reading c. Sl
k0ka [10]

the answer is a.) reading

6 0
3 years ago
Read 2 more answers
Other questions:
  • You are troubleshooting a network issue on a client computer and discover that the network card has an IP address of 169.254.196
    6·1 answer
  • From the video "Your Password Sucks", using computer power to guess your password by trying multiple variations one after the ot
    15·2 answers
  • ll of the following are extra precautions you can take to secure a wireless network EXCEPT ________. Select one: A. turn on secu
    9·1 answer
  • Credibility means that the reader perceives value in what you write.<br> True False
    12·1 answer
  • If you want to copy text formatting from one area of your document to another area, _____. a. select the formatting you would li
    5·1 answer
  • You receive a file named Project4.xlsx as an attachment to an email message. What do you expect the file to contain?
    8·1 answer
  • The biggest factor in determining the price of a mortgage is:
    14·1 answer
  • On his computer desktop, Rodney can see several different files, each immediately accessible. Because he is actively working on
    13·1 answer
  • The address for the website you want to visit is called the browser internet URL World Wide Web
    5·2 answers
  • Write the line of Python code that calculates and prints the answer to the following arithmetic expressions.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!