Professional Documents
Culture Documents
Code
Code
[5, 'Foundation', 1000, '$1,000', '-', '-', '-', '-', '$80,000', '-',
'-'],
[5, 'Framing', 4500, '-', '-', '-', '$76,667', '-', '-', '$76,667',
'-'],
[5, 'Exterior', 1800, '-', '-', '-', '-', '$127,500', '-', '-', '-'],
[5, 'Roofing', 2500, '-', '-', '-', '-', '$50,000', '-', '-', '-'],
[5, 'Mechanical', 500, '-', '-', '-', '-', '$120,000', '-', '-', '-'],
[5, 'Interior', 2550, '-', '-', '-', '-', '$180,000', '-', '-', '-'],
[5, 'Finish', 3100, '-', '-', '-', '-', '$16,000', '-', '-', '-'],
headers = [
'House', 'Task', 'Amount of Work',
'Week 5 PV (CAD)', 'Week 5 Work Comp. (Quantity)', 'Week 5 EV (CAD)',
'Week 10 PV (CAD)', 'Week 10 Work Comp. (Quantity)', 'Week 10 EV
(CAD)',
'Week 27 PV (CAD)', 'Week 27 Work Comp. (Quantity)', 'Week 27 EV
(CAD)'
]
print("\nWeek 10 Metrics:")
print(f"SPI of Week 10: {spi_week10:.2f}")
print(f"CPI of Week 10: {cpi_week10:.2f}")
print(f"CV of Week 10: {cv_week10:.2f}")
print(f"SV of Week 10: {sv_week10:.2f}")
print("\nWeek 27 Metrics:")
print(f"SPI of Week 27: {spi_week27:.2f}")
print(f"CPI of Week 27: {cpi_week27:.2f}")
print(f"CV of Week 27: {cv_week27:.2f}")
print(f"SV of Week 27: {sv_week27:.2f}")
# Print project status messages based on SPI and CPI for each week
print("\033[1m\nProject Status Messages:\033[0m")
print("\033[1mWeek 5:\033[0m")
if spi_week5 > 1:
print("\033[1mThe project is ahead of schedule\033[0m")
else:
print("\033[1mThe project is behind schedule\033[0m")
if cpi_week5 > 1:
print("\033[1mThe project is under budget\033[0m")
else:
print("\033[1mThe project is over budget\033[0m")
print("\033[1m\nWeek 10:\033[0m")
if spi_week10 > 1:
print("\033[1mThe project is ahead of schedule\033[0m")
else:
print("\033[1mThe project is behind schedule\033[0m")
if cpi_week10 > 1:
print("\033[1mThe project is under budget\033[0m")
else:
print("\033[1mThe project is over budget\033[0m")
print("\033[1m\nWeek 27:\033[0m")
if spi_week27 > 1:
print("\033[1mThe project is ahead of schedule\033[0m")
else:
print("\033[1mThe project is behind schedule\033[0m")
if cpi_week27 > 1:
print("\033[1mThe project is under budget\033[0m")
else:
print("\033[1mThe project is over budget\033[0m")
Code-2
from tabulate import tabulate
headers = [
'Activity No.', 'Activity', 'Duration', 'Total Float', 'Desired Rate',
'Calculated Crews', 'Actual Crew', 'Actual Rate', 'First Unit',
'Last Unit', 'Adjusted First Unit', 'Adjusted Last Unit'
]