File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ def average(numbers):
8
8
total += number
9
9
return total / length
10
10
11
+
12
+ # FINANCIAL ANALYSIS (results printed to terminal)
11
13
input_path = os .path .join ('.' ,"budget_data.csv" )
12
- output_file = os .path .join ('.' , "financial_analysis.txt" )
13
14
14
15
with open (input_path , newline = "" ) as csvfile :
15
16
csvreader = csv .reader (csvfile , delimiter = "," )
@@ -44,7 +45,11 @@ def average(numbers):
44
45
print ("Greatest Increase in Profits: " + str (maxmonth ) + " ($" + str (max_profit ) + ")" )
45
46
print ("Greatest Decrease in Profits: " + str (minmonth ) + " ($" + str (min_profit )+ ")" )
46
47
48
+
49
+
47
50
# WRITE RESULTS TO TXT
51
+ output_file = os .path .join ('.' , "financial_analysis.txt" )
52
+
48
53
with open (output_file , "w" , newline = "" ) as output_file :
49
54
output_file .write ('.....................................................' )
50
55
output_file .write ('\n Financial Analysis' )
You can’t perform that action at this time.
0 commit comments