Skip to main content

Posts

Showing posts from January, 2025

ass1

Asssignment main.py  from read_input import read_input from mk_sched import mk_sched import argparse def print_sched ( sched , F_Cost ):     day = 1     total = 0     for tasks , menu in sched :         print ( f "Day { day } :" )         for t in tasks :             print ( f "  A { t .id } - { t .food } " )         cost = sum ( F_Cost [ i ] * q for i , q in menu .items())         print ( f "  Menu: { menu } " )         print ( f "  Cost: { cost } \n " )         total += cost         day += 1     print ( f "Total Cost: { total } " )     def main ():     parser = argparse . ArgumentParser ( description = "Generate task schedule from a .dag file." )     parser . add_argument ( '-f' , '--file' , requi...