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
What is the difference between a loop and a function?
Eduardwww [97]
Big difference
Loops allow you to execute code multiple times while a condition is true
Functions allow you to “call” a snippet of code whenever you want, and you can pass it arguments that could affect the data it returns
7 0
2 years ago
Read 2 more answers
Antiglare screens are sometimes called ____.
yaroslaw [1]
Simply a glare screen, because it clearly states what it protects one against, I guess.
8 0
3 years ago
1. Give state diagrams of DFAs recognizing the following languages. The alphabet is {0, 1}. (a) {w | w is any string except 11 a
storchak [24]

Answer:

Explanation:

The first diagram shows the DFA that accepts that accepts any string except 11 and 111

The second diagram shows every odd position of w is 1

6 0
3 years ago
write a pseudo code that will allow a user to enter a number and divide that number by eleven and take the the modules of the en
emmasim [6.3K]

Answer:

sdhuvbfuisg

Explanation:

4 0
3 years ago
In this chapter, we use the metaphor of a blueprint and houses that are createdfrom the blueprint to describe classes and object
Pachacha [2.7K]

Answer:

The correct answer to the following question will be Classes.

Explanation:

Class:

  • Class and objects are the two basic concepts of Object-oriented programming language (Oops).
  • A prototype by which an object can be created.
  • A Class is a collection of data members and member functions.
  • A Class is a user-defined blueprint on an object.
  • Declaration of a class includes: Class names, modifiers, Super class, interfaces and body
8 0
3 years ago
Other questions:
  • How can i add card reader to pc answers?
    9·1 answer
  • You will write a program that reads a binary file that contains records of creatures. Each record can be stored in a Creature st
    10·1 answer
  • Among the eight unique features of​ e-commerce, which is related to the ability to interact with web technology​ everywhere?
    14·1 answer
  • It is not important to keep financial records since they can all be found online.
    5·2 answers
  • We can sort a given set of n numbers by first building a binary search tree containing these numbers (using Tree-Insert repeated
    12·1 answer
  • This is pixlr
    6·1 answer
  • Complete the sentence about entering and editing data in a cell in a spreadsheet.
    13·1 answer
  • Which devices are used in networking
    15·1 answer
  • In the program below, numA is a _____.
    8·2 answers
  • How does a Cloud-first strategy approach a client's migration to the Cloud?by removing outside ecosystem partners from the Cloud
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!