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, 21.06.2019 15:40
Establish which of the following statements are true. (a) a sequence is convergent if and only if all of its subsequences are convergent. (b) a sequence is bounded if and only if all of its subsequences are bounded. (c) a sequence is monotonic if and only if all of its subsequences are monotonic.
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
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
question
Mathematics, 08.01.2021 01:00
question
Social Studies, 08.01.2021 01:00
question
Mathematics, 08.01.2021 01:00
question
Mathematics, 08.01.2021 01:00
question
Mathematics, 08.01.2021 01:00
question
Mathematics, 08.01.2021 01:00
Questions on the website: 13722363