Question: For this assignment, you ll be writing a program to display summary information about a single user's account on the system. Here are the specifications
For this assignment, youll be writing a program to display summary information about a single
user's account on the system. Here are the specifications for your program. Make sure you read
and understand the requirements before proceeding:
Your program will take one commandline argument, which will be the name of the account
to summarize.
If no commandline argument is given or if too many commandline arguments are
provided, display a usage statement and exit the program without further processing. You
can assume that the account exists; no validation of this fact is necessary. The usage
statement should look something like this:
lastsummarypy username
where you will replace lastsummarypy with the name of the currently running
program. Make sure to make this aspect of the usage statement dynamic and not hardcoded
as literally lastsummarypy
If a single commandline argument is provided, your program will then process the output
from last and display a numbered summary of that accounts login activity as well as
including the following information: account name, how many logins were executed
including currently logged in sessions and the time in HH hours and MM minutes
format. HH and MM should be two digits with leading s if necessary. See the example runs
for samples of how your output should look.
Output requirements
You must display each login entry, prefaced by a login # sequential numbers starting at
See the final page for a complete example of the output.
Make sure your final output follows this formatting, where the time should be in the format
HH hours and MM minutes where HH and MM hours and minutes should both
be two digits in length, including leading s if necessary. The user's full account name,
logins and time should each be displayed on separate lines in that order at the end of all
other output:
Account: ACCOUNTNAME
Total logins: TOTALLOGINS
HH hours and MM minutes
replacing ACCOUNTNAME TOTALLOGINS HH and MM as apporpriate.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
