1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
finlep [7]
3 years ago
9

Description

Computers and Technology
1 answer:
lapo4ka [179]3 years ago
5 0

Answer:

from datetime import time, datetime, timedelta, date

for _ in iter(list, 0):

   t1 = input("Please enter time one: ")

   t2 = input("Please enter time two: ")

   if t1.isdigit() == True and (int(t1[:2])<=23 and int(t1[2:]) <= 59)\

       and t2.isdigit() == True and (int(t2[:2])<= 23 and int(t2[2:])<=59):

       time_1 = time(hour=int(t1[:2]), minute=int(t1[2:]))

       time_2 = time(hour= int(t2[:2]), minute=int(t2[2:]))

       if time_1 > time_2:

           diff = datetime. combine (date. today( ), time_1) - datetime. combine(date. today ( ), time_2)

       else:

           diff = datetime. combine (date. today( ), time_2) -datetime. combine(date. today ( ), time_1)

       diff_list = str(diff).split(":")

       del diff_list[2]

       diff_t = "". join (diff_list)

       print(diff_t)

       break        

   if t1.isdigit() == False or t2.isdigit() == False:

       print("Military Time Forest Required: Bad input, try again.")

       continue

   elif int(t1[:2])> 23 or int(t2[:2])> 23:

       print("Military Tine Format Required: Hours must be between 00 and 23, try again")

       continue

   elif int(t1[2:])> 59 or int(t2[2:])> 59:

       print("Military Tine Format Required: Minutes must be between me and 59, try again")

       continue

Explanation:

The python Datetime package is used to manipulate date and time, creating immutable Datetime objects from the various python data types like integer and string. The block of code above is a conditional for-loop statement that gets two user time value inputs and prints out the difference as a string in Military forest time format.

You might be interested in
The first row in a table is referred to as the _____ row and the last row is considered the _____ row.
Juliette [100K]

the first row in a table is classed as the header row.

and with the last one I'm not sure because as far as I know there's not considered a last row.

6 0
3 years ago
In computing the present value of the lease payments, the lessee should a.use both its incremental borrowing rate and the implic
JulijaS [17]

Answer:

The answer is  "Option a"

Explanation:

This payment is equivalent to the regular rent formally specified by the same contract that grants the member the rights for a specified time. It used both the nominal lending rate and the lessor's conditional value,  which provides the lower implied rate, and wrong choices can be described as follows:

  • In option b, It is wrong because in this we assume the implicit rate is lessee.
  • Option c and Option d both were wrong because It doesn't use the Iterative credit rate.

6 0
3 years ago
How do hardware and software work together to allow a user to perform a function?
qaws [65]

Answer:

jointly

Explanation:

Because Hardware and Soft ware have to JOIN together to make something work

I hope i helped!

4 0
3 years ago
Read 2 more answers
A(n) ________ virus runs a program that searches for common types of data files, compresses them, and makes them unusable.
ad-work [718]

Answer:

encryption

Explanation:

A(n) encryption   virus runs a program that searches for common types of data files, compresses them, and makes them unusable.

5 0
3 years ago
True / False<br> Generally, more orthogonal instruction sets are considered less elegant.
Cerrena [4.2K]

Answer: True

Explanation:Orthogonal instruction set is the set of instruction that can use can use all addressing mode. They have independent working and so instruction can use any register the prefer and this leads to overlapping in instruction and complexity.

When RISC architecture got introduced ,it got more preference due to reduced instruction and less complexity as compared to orthogonal instruction.So it not considered elegant to have more orthogonal instruction.

6 0
3 years ago
Other questions:
  • While engineers work to create computers that can understand us emotionally, ________ are also evolving toward a more human appe
    12·1 answer
  • The term composite would be used to describe an image that was altered by the Crop tool.
    15·1 answer
  • You use Cat5e twisted pair cable on your network. Cables are routed through walls and the ceiling. A user puts a screw in the wa
    9·1 answer
  • What are the five types of alignment in Word?
    12·2 answers
  • Provides images of weather systems, and helps to track storms at different altitudes
    7·1 answer
  • A large software development company employs 100 computer programmers. Of them, 45 areproficient in Java, 30 in C, 20 in Python,
    9·1 answer
  • Deleting anitem from a linked list is best when performed using two pointersso that the deleted item is freed from memory.
    7·1 answer
  • Ports that are generally used to establish outbound connections are known as ___ ports.
    14·1 answer
  • How do you create multiple columns in Word?
    12·1 answer
  • 1.What is the output of the following program? [10 Marks]namespace ConsoleApp1{class Program{static void Main(string[] args){int
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!