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
Masja [62]
3 years ago
9

Create a Python script that takes two parameters to do the following:-

Computers and Technology
1 answer:
tekilochka [14]3 years ago
6 0

Answer:

import sys, time

from os import walk, remove

from os.path import exists, join, getsize, getctime

file_counter = [ ]

folder_name, file_size = argv

isExist = exists( folder_name )

if folder_name == True:

    for root, folder, files in walk( folder_name ):

          for file in files:

               if getsize( join ( root, file ) ) >= file_size:

                   file_log = [ ]

                   file_log.append( file )

                   file_log.append( join ( root, file) )

                   file_log.append( time.ctime( getctime( file ) ) )

                   file_counter.append( file_log )

               else:

                   remove ( join ( root, file ) )

Explanation:

The python script above output the filename, size and file creation date of any folder passed to it.

You might be interested in
Checking authentication, checking authorization and access control, auditing systems, and verifying firewalls and other filters
nadezda [96]

Answer: Logical security list

Explanation:Logical security list that is used for checking of the authentication and authorization for the organizations. It consist the safeguarding the software, security access of password and other keys, system auditing, stages of the security etc.

These factors helps in the maintaining the level of the security and only authorized access to place in the system of a particular organization.Other options are incorrect because physical security system consist of the guards , locks etc physical devices, response plane is the feedback strategy and whiltelist is related with the acceptable people.

3 0
4 years ago
Who knows my aunt better?
fiasKO [112]

Answer:

yes, yes, 30, November 5

6 0
3 years ago
Read 2 more answers
Write a method named circleArea that accepts the radius of a circle as a parameter (as a real number) and returns the area of a
lions [1.4K]

Answer:

  public static double circleArea(double radius){

       double area = 3.142*Math.pow(radius,2);

       return area;

   }

Explanation:

Find the complete program in java that prompts the user to enter a value for radius, stores it in a variable, calls the method circleArea() and passes the value for the radius, then displays the area.

import java.util.Scanner;

public class CocaColaVendingTest {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Please enter the value for radius");

       double r = in.nextDouble();

       //Calling the method circleArea()

       double calcArea = circleArea(r);

       System.out.println("The Area is: "+calcArea);

   }

   public static double circleArea(double radius){

       double area = 3.142*Math.pow(radius,2);

       return area;

   }

}

6 0
3 years ago
Press the enter key in all of the following circumstances except _____.
fiasKO [112]
B. When the insertion point reaches the right margin 
6 0
3 years ago
Differentiate between symmetric and asymmetric encryption
Shalnov [3]

Answer:

While symmetric encryption uses a single shared key to encrypt and decrypt data, asymmetric uses two separate keys

8 0
2 years ago
Read 2 more answers
Other questions:
  • Which two things will you see when you collapse the view of the subdocument in a master document? (Microsoft Word)
    8·2 answers
  • Please help!
    10·1 answer
  • The index finger on your right hand types the _____.
    11·1 answer
  • Which of the following techniques has to do with how the people who make the commercial manipulate the way it looks?
    8·1 answer
  • In which of the following situations will a macro make your work more efficient?
    12·1 answer
  • Explain the concept of scalability. How would you respond?
    15·1 answer
  • Which of the following is the general term used to describe software code that isdesigned to cause damage to a computer system?
    10·1 answer
  • Which of the columns (A) to (I) in the truth table below is correct for the expression
    13·2 answers
  • 14 Copy a picture of a crane on the next page. Do not trace them. Make a freehand sketch. (2) 2 Look at the placed where the Mar
    11·1 answer
  • click the view lab button. restart the computer and press the f2 or delete key on your keyboard to enter the bios setup program.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!