Environment

  • The source code is written in Python 3.11.5.
  • The execution platform used was Fedora (Linux).
  • No external or standard libraries were used in the implementation of this work.

Execution

  1. Download and install Python 3.11.5 or any Python 3.x version.

  2. In your terminal, execute the Python script by typing:

    python3 [file_name].py
    
  3. When running the goodie.py script, just enter:

    python3 goodie.py
    

    That is all.

  4. When running the jobs.py script, you'll need to enter data in the following format:

    • Enter the number of Jobs: n as an interger between 0 and 10.
    • For each job:
      • Enter start date, end date and profit in that order.
      • You will be guided by the script when running it.
      • entering the jobs is a for loop of n jobs.

Sample Data for jobs.py

Enter the number of Jobs: 3
Enter job start time, end time, and earnings

Start date: 0900
End date: 1030
Profit: 100

Start date: 1000
End date: 1200
Profit: 500

Start date: 1100
End date: 1200
Profit: 300

Caution

  • Do not delete the following files: sample_input.txt, goodie.py, jobs.py, and .gitignore.