Module#6Assignment
Question 1: import sys from datetime import datetime from datetime import time from datetime import date def main(): dt = datetime.now() time_string = dt.strftime("%X") # utc = datetime.utcnow() for line in sys.stdin: data = line.strip().split("\t") if len(data) == 6: _date, _time, store, item, cost, payment = data print(f"{dt}\t{time_string}\t{store}\t{item}\t{cost}\t{payment}") main() The output from the code above took too long to produce and I don't know if it's because of the input volume in sys.stdin. The code seems fine to run but it wasn't able to produce output when I tried to call the function main() Question 2: from datetime import timedelta current_dt = datetime.now() new_dt = current_dt + timedelta(days = 2*365) - timedelta(seconds = 60) new_time_string = new_dt.strftime("%X") print(new_dt) Output: 2025-06-24 17:29:16.615776 Question 3: # Creating a timedelta object...