Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

Task 1 Write a python script to generate three sets of 50…

Customer Question
Task 1 Write a python script...
Task 1
Write a python script to generate three sets of 50 files (150 files total) with random dates in the file name from within the last 50 days:
IT421_unixdate.txt, IT151_unixdate.txt, IT620_unixdate.txt
where unixdate is the seconds since Jan 01 1970. Ex:(###) ###-####is 03/03/2016 @ 0750
Example file: IT421_1456991403.txt
Task 2
Write a python script to:
Check if the folders IT421, IT151, IT620 exist, if they do not, create them.
Move the files that begin with ITx to the folder ITx
If the file already exists in the folder, rename it like the following example:
IT421_1456991403.txt becomes IT421_1456991403(1).txt, IT421_1456991403(1).txt becomes IT421_1456991403(2).txt, and so on….
Task 3
Write a python script to, using the date from the filename, display:
Oldest file
Newest file
How much time has elapsed between the newest and oldest file.
for each of the three folders.
Task 4
Write a python script to:
For each folder, create a folder called old if it does not exist.
Move all files older than 25 days into that folder.
Apply the same renaming scheme as done in task 2.
Submitted: 2 years ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Customer reply replied 2 years ago
I need this before 8:00am PST
Customer reply replied 2 years ago
This is how the program starts.#!/usr/local/bin/python3
import random
import time
import osfolders = ["IT421", "IT151", "IT620"]#task2(1)for i in range(0,len(folders)):
if not os.path.exists(folders[i]):
os.mkdir(folders[i])#task1
for i in range (0,50):
for classIT in folders:
pastFiftyDays = int(time.time()) - 432000
currentTime = int(time.time())
timeStamp = str(random.randrange(pastFiftyDays, currentTime))
Answered in 6 hours by:
3/8/2016
Programmer: Ingo U, Software Engineer replied 2 years ago
Ingo U
Ingo U, Software Engineer
Category: Programming
Satisfied Customers: 796
Experience: Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL
Verified

Hi,

I'm just seeing this now, 40 minutes is a little tight, can you extend the deadline at all?

Ask Your Own Programming Question
Customer reply replied 2 years ago
How about 8:40 am PST
Programmer: Ingo U, Software Engineer replied 2 years ago

I'll give it a try.

Ask Your Own Programming Question
Programmer: Ingo U, Software Engineer replied 2 years ago

is the code you pasted something you were given and have to use, or is it your work in progress so far?

Ask Your Own Programming Question
Customer reply replied 2 years ago
progress so far, but that is how it was suppose to be started
Customer reply replied 2 years ago
I am out the door right now and won't be available until around 8:15. I have to have this zipped and turned in by 8:50am PST.
Programmer: Ingo U, Software Engineer replied 2 years ago

I'm sorry,
After reviewing the question, I regret that I won't be able to assist you at this time.

I am opting out and opening the question up to other professionals here who may be able to help.

Regards,
Ingo U

Ask Your Own Programming Question
Customer reply replied 2 years ago
Thanks anyway. I appreciate your taking the time to look at it.
Customer reply replied 2 years ago
Too late: asking for a refund
Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a programmerLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask ATLPROG Your Own Question
ATLPROG
ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7,677
7,677 Satisfied Customers
Experience: MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

ATLPROG is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,175 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

848 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
You have helped me before, can you help me with a few unix
You have helped me before, can you help me with a few unix scripts now? I have a few of tuem to be written and need them by monday. There are about 5 different unix and perl scripts. I am not sure how… read more
Mr. Wilson
Mr. Wilson
Teacher
Master\u0027s Degree
200 satisfied customers
Thank you! I had some questions with a python program, I'm
Thank you! I had some questions with a python program … read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
Python 2.7.12 question - how do i write a list containing a
Python 2.7.12 question - how do i write a list containing a certain number of records to a file? The number of records is based on raw input. I need to separate the list into 2 separate files, one con… read more
Steve
Steve
Consultant
Bachelor
69 satisfied customers
List of built-in functions in Python: len(s) = Return the
List of built-in functions in Python: len(s) = Return the number of characters in string "s" int(a) = Convert string or floating point value "a" to integer float(a)= Convert string or integer value "a… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
I have a question about a UNIX script, I need to create a
I need to create a script that that uses the UNIX cshell script foreach loop … read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
I need to Write a program that will count how many there are
I need to Write a program that will count how many there are of each word in a file. I need to Print it out with the words ordered by frequency (most frequent first), and alphabetically. In python 2.7… read more
Zabo04
Zabo04
Master\u0027s Student
Master\u0027s Degree
7 satisfied customers
0 down vote favorite I am trying to delete multiple folders
0 down vote favorite I am trying to delete multiple folders that will be read from a txt file. I am not sure how to get it to loop through the computers in the text file while pulling the currently lo… read more
AAATom
AAATom
Software Engineer
Master\u0027s Degree
42 satisfied customers
I have a pearl script that right now takes a tracking file
I have a pearl script that right now takes a tracking file and from our shipping software and converts it into the format we need to import into our Software. the issue is the tracking # is too long a… read more
teknosof
teknosof
Software Engineer
Master\u0027s Degree
13 satisfied customers
For Drouleau only The Inst. wants this as the opening def: def
For Drouleau only The Inst. wants this as the opening def: def fermat_test2(p): xs = [random.randint(2,p-1) for i in range(20)] return xs == [rpexptmodn(x,p) for x in xs] Also this is the codes that a… read more
DRouleau
DRouleau
College Diploma
105 satisfied customers
Need a python script that will take a spread sheet(.csv file
Need a python script that will take a spread sheet(.csv file) of phone numbers and break them out into the following three areas: (1) numbers with a certain exchange(exchange is the first three #s aft… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
Teacher added to the project. 1. Write a script that inputs
Teacher added to the project. 1. Write a script that inputs a line of plain text and a distance value and outputs an encrypted text using a Caesar cipher. The script should work for any printable char… read more
Brian H
Brian H
Senior Software Engineer
Master\u0027s Degree
55 satisfied customers
Hello, How are you today. I was not able to get the last
Hello, How are you today. I was not able to get the last sql job done because my virtual environment crashed several times on my Mac OSx. However, I have a task ahead of me where I'm kind of lost beca… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
C COURSEWORK Task 1 Write a program that opens a file
C COURSEWORK Task 1 Write a program that opens a file of text. You can create your own file for testing purposes. As a minimum requirement, you may hard-code the filename into the program (if you do t… read more
Guests
Guests
High School or GED
4 satisfied customers
I am an aspiring DJ who just purchased my first system which
I am an aspiring DJ who just purchased my first "system" which included from a private sale... 4 DVD's of music. Appx 20k songs. Each DVD when opened onto HD contains appx. 60 or so folders and each f… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
I need help with two Python programming homeworks. They are
I need help with two Python programming homeworks. They are two very simple programs but I don't have time to do it because of exams. The links to the homeworks are posted below since the instructions… read more
Pieter
Pieter
Bachelor's Degree
28 satisfied customers
This project is a continuation of your earlier work. In this
This project is a continuation of your earlier work. In this project, you will create the necessary script(s) for the tree structure you designed in the last one. You must test whether a file or direc… read more
C.Martin
C.Martin
IT Consultant
Bachelor's Degree
453 satisfied customers
Can any expert help with this java problem. You can dowload
Can any expert help with this java problem. You can dowload question from www.wikisend.com Download link: http://wikisend.com/download/538270/java exc.docx… read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
I have a programming assignment I need help with It involves
I have a programming assignment I need help with It involves writing two very short Java programs using for, while, and do-while statements. I can provide the specs. If you are interested in doing thi… read more
linbios
linbios
Master's Degree
24 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x