I believe the answer is Klip on plato
rise up was correct just finished the test
Answer:
hour = float(input("Enter hour:"))
minute = float(input("Enter minute:"))
second = float(input("Enter second:"))
am_pm = input ("Enter AM or PM:")
if am_pm == "AM":
if hour == 12:
hour = 0
seconds_since_midnight = ((3600 * hour) +(minute *60) + second)
elif am_pm == "PM":
seconds_since_midnight = ((3600 * (hour+12)) +(minute *60) + second)
print("Seconds since midnight:", int(seconds_since_midnight))
Explanation:
The point here is when PM is chosen, you need to add 12 to the hour. I added <em>elif</em> part to satisfy this. Moreover, since the output is in integer format, you may need to apply type casting for <em>seconds_since_midnight</em> variable.
Answer:
Make use of hash tables
Explanation:
The appropriate thing to use for this should be a hash table.
A Hash Table can be described as a data structure which stores data in an associative manner. In a hash table, data is stored in an array format, where each data value has its own unique index value. Access of data becomes very fast if we know the index of the desired data. So we can perform Hashing on ISBN Number since its unique and based on the Hash Function w ecan store the Information record.
There is no requirement for printing the file in order - HashTables dont store the data in order of insertions, so no problems with that
It becomes a data structure in which insertion and search operations are very fast irrespective of the size of the data. So Querying books details can be fast and searching will take less time.
It can also be pointed out that it wont be too expensive for Hardware implemtation as HashTables stores data based on Hash Functions and memory consumption is also optimal which reduces memory wastages.
Answer:
CPI = 0.94
Explanation:
The formula for execution time is given below:
Execution time = clock cycles * cycle time
As Execution time = 750 s
clock cycle time = 0.333 ns = 0.333 * 10^-9
so putting these values in the above formula, we get
750 = clock cycles * ( 0.333 * 10^-9 )
clock cycles = 750 / ( 0.333 * 10^-9 )
clock cycles = 2.25 * 10^12
As the results of the spec cpu2006 bzip2 benchmark running on an amd barcelona has an instruction count = 2.389 * 10^12
and the formula for clock cycles is:
clock cycles = number of instructions * CPI
CPI = clock cycles / number of instructions
CPI = 2.25 * 10^12 / 2.389 * 10^12
CPI = 0.94