subject

Write a python program to do the following. ask user to enter time in the format of hh: mm: ss. for example, 11: 07: 28. hour must be a two-digit number between 0 and 23, inclusive. minute and second must be two-digit numbers between 0 and 59, inclusive. the program needs to check whether the time entered is valid.
check whether there are exactly two colons. display an error message and stop if the input is invalid.
check whether hour is a two-digit number. display an error message and stop if the input is invalid.
check whether minute is a two-digit number. display an error message and stop if the input is invalid.
check whether second is a two-digit number. display an error message and stop if the input is invalid.
check whether hour is between 0 and 23, inclusive. display an error message and stop if the input is invalid.
check whether minute is between 0 and 59, inclusive. display an error message and stop if the input is invalid.
check whether second is between 0 and 59, inclusive. display an error message and stop if the input is invalid.
if the time entered is valid, remove the colons and display the time. for example, if the input time is 11: 07: 28, the program should display 110728.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:00
Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". any value that is the same as the immediately preceding value is considered a consecutive duplicate. in this example, there are three such consecutive duplicates: the 2nd and 3rd 5s and the second 6. note that the last 3 is not a consecutive duplicate because it was preceded by a 7. write some code that uses a loop to read such a sequence of non-negative integers , terminated by a negative number. when the code finishes executing, the number of consecutive duplicates encountered is printed. in this case, 3 would be printed. assume the availability of a variable, stdin, that references a scanner object associated with standard input. that is, stdin = new scanner(system.in); is given.
Answers: 1
question
Computers and Technology, 22.06.2019 12:50
You have just been hired as an information security engineer for a large, multi-international corporation. unfortunately, your company has suffered multiple security breaches that have threatened customers' trust in the fact that their confidential data and financial assets are private and secured. credit-card information was compromised by an attack that infiltrated the network through a vulnerable wireless connection within the organization. the other breach was an inside job where personal data was stolen because of weak access-control policies within the organization that allowed an unauthorized individual access to valuable data. your job is to develop a risk-management policy that addresses the two security breaches and how to mitigate these risks.requirementswrite a brief description of the case study. it requires two to three pages, based upon the apa style of writing. use transition words; a thesis statement; an introduction, body, and conclusion; and a reference page with at least two references. use a double-spaced, arial font, size 12.
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
question
Computers and Technology, 25.06.2019 09:30
Network administration is concerned with which tasks? the installation and maintenance of network hardware and software the installation and maintenance of computer operating systems the diagnosis and repair of some types of computer hardware the monitoring of users' activity on a social networking site
Answers: 1
You know the right answer?
Write a python program to do the following. ask user to enter time in the format of hh: mm: ss. for...
Questions