need help for below question:Here is the test file:# Script CodeHere is the funcs file:import introcs”””import introcs # For assert_equals and assert_trueimport func # This is what we are testingdef test_second_in_list(): “”” Test procedure for second_in_list. “”” print(‘Testing second_in_list’) # Should work after steps 1 and 2 result = func.second_in_list(‘apple, banana, orange’) introcs.assert_equals(‘banana’,result) # Should work after step 3 result = func.second_in_list(‘Billy, Andrew, Wendy’) introcs.assert_equals(‘Andrew’,result) result = func.second_in_list(‘apple, fig , orange’) introcs.assert_equals(‘fig’,result) # Should work after step 4 result = func.second_in_list(‘apple, fig, banana’) introcs.assert_equals(‘fig’,result) result = func.second_in_list(‘apple, fig, banana, orange’) introcs.assert_equals(‘fig’,result) # Should work after step 5 result = func.second_in_list(‘do , re , me , fa ‘) introcs.assert_equals(‘re’,result) result = func.second_in_list(‘z,y,x,w’) introcs.assert_equals(‘y’,result) # Do not write below this linetest_second_in_list()print(‘Module func is working correctly’)def get_seconds(time): “”” Returns the number of seconds in the string time (as an int). The value time is a string in extended ISO 8601 format. That is, it has the form ‘hh:mm:ss’ where h, m, and s are digits. There must be exactly two digits each for hours, minutes, and seconds, so they are padded with 0s when necessary. leading 0s if they are only one digit, but there may be only one hour digit. For more information, see https://en.wikipedia.org/wiki/ISO_8601#Times This function does not support time zones, abbreviated formats, or decimals Example: get_seconds(’12:35:15′) returns 15 Example: get_seconds(’03:02:05′) returns 5 Example: get_seconds(’00:00:00′) returns 0 Parameter time: The string representation of the time Precondition: time is a string in extended ISO 8601 format ‘hh:mm:ss’ “”” get_seconds=int(time[6:]) return get_seconds def get_minutes(time): “”” Returns the number of minutes in the string time (as an int). The value time is a string in extended ISO 8601 format. That is, it has the form ‘hh:mm:ss’ where h, m, and s are digits. There must be exactly two digits each for hours, minutes, and seconds, so they are padded with 0s when necessary. leading 0s if they are only one digit, but there may be only one hour digit. For more information, see https://en.wikipedia.org/wiki/ISO_8601#Times This function does not support time zones, abbreviated formats, or decimals Example: get_minutes(’12:35:15′) returns 35 Example: get_minutes(’03:02:05′) returns 2 Example: get_minutes(’00:00:00′) returns 0 Parameter time: The string representation of the time Precondition: time is a string in extended ISO 8601 format ‘hh:mm:ss’ “”” get_minutes=int(time[3:5]) return get_minutes def get_hours(time): “”” Returns the number of hours in the string time (as an int). The value time is a string in extended ISO 8601 format. That is, it has the form ‘hh:mm:ss’ where h, m, and s are digits. There must be exactly two digits each for hours, minutes, and seconds, so they are padded with 0s when necessary. leading 0s if they are only one digit, but there may be only one hour digit. For more information, see https://en.wikipedia.org/wiki/ISO_8601#Times This function does not support time zones, abbreviated formats, or decimals Example: get_hours(’12:35:15′) returns 12 Example: get_hours(’03:02:05′) returns 3 Example: get_hours(’00:00:00′) returns 0 Parameter time: The string representation of the time Precondition: time is a string in extended ISO 8601 format ‘hh:mm:ss’ “”” get_hours=int(time[0:2]) return get_hoursdef str_to_seconds(time): “”” Returns the number of seconds since midnight in the string time (as an int). The value time is a string in extended ISO 8601 format. That is, it has the form ‘hh:mm:ss’ where h, m, and s are digits. There must be exactly two digits each for hours, minutes, and seconds, so they are padded with 0s when necessary. So seconds, minutes, and hours may have leading 0s if they are only one digit. For more information, see https://en.wikipedia.org/wiki/ISO_8601#Times This function does not support time zones, abbreviated formats, or decimals Example: str_to_seconds(’12:35:15′) returns 45315 Example: str_to_seconds(’03:02:05′) returns 10925 Example: str_to_seconds(’00:00:00′) returns 0 Parameter time: The string representation of the time Precondition: time is a string in extended ISO 8601 format ‘hh:mm:ss’ “””(not correct here) iso=get_seconds+get_minutes*60+get_hours*3600 print(get_seconds) print(get_minutes*60) return secondsQuestion: 23. Implement str_to_seconds get_r 86 return get_hours It is now time to implement the main functionstr_to_seconds . This function is a little more complicated and may 87 88 take more than one line. However,this is still a relatively easy function to implement. Remember that there are 60 89 def str_to_seco… Show more… Show moreComputer ScienceEngineering & TechnologyPython Programming
solved : need help for below question:Here is the test file:# Script
How it works
- Paste your instructions in the instructions box. You can also attach an instructions file
- Select the writer category, deadline, education level and review the instructionsÂ
- Make a payment for the order to be assigned to a writer
- Â Download the paper after the writer uploads itÂ
Will the writer plagiarize my essay?
You will get a plagiarism-free paper and you can get an originality report upon request.
Is this service safe?
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
LET THE PROFESSIONALS WRITE YOUR PAPER!