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.
The code is in Java.
It uses a built-in function named chartAt() to get the character at the entered index.
Recall that built-in functions are functions that are already defined in the language. We can use them by calling the function and passing the required argument. The chartAt() function takes an index and returns the character at that index.
Comments are used to explain each line of the code.
//Main.java
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
//Scanner object to get input from the user
Scanner input = new Scanner(System.in);
//Declaring the variables
String s;
int index;
char c;
//Getting the inputs
s = input.nextLine();
index = input.nextInt();
//Getting the character at the index using the charAt() function
c = s.charAt(index);
//Printing the character
System.out.println(c);
}
}
You may check the following link to see another similar question:
brainly.com/question/15688375
Drunk driving seems to be a big problem with teens because they are usually not experienced in driving. Once they drink and drive they have a false sense of invincibility and make poor decisions behind the wheel. In order to keep the numbers of drunk teen crashes declining, there should be testimonial videos of the people that have been affected by drunk drivers.
Another idea is, one group trying to end drunk driving. It's mission is to end drunk driving, help fight drugged driving, support the victims of these violent crimes, and prevent underage drinking.
Hope I helped !!!!^_~!!!
"javac <FILE NAME>" (unsurprisingly, stands for "java compile"), will compile your java source code in to a .java file, that can be run with the "java <FILE NAME>" command.
Make sure that your command prompt is set to the right destination when you run these commands, using "cd <DESTINATION>", otherwise they may be unable to find them in the incorrect destination.