largest = int(input("Enter a number: "))
print("Largest: {}".format(largest))
i = 0
while i < 5:
num = int(input("Enter a number: "))
if num > largest:
largest = num
print("Largest: {}".format(largest))
i += 1
I hope this helps!
Ask anything here: https://www.answers.com/search?q=Ask%20any%20question&filter=all
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.