Build a Budget App - Build a Budget App

Tell us what’s happening:

I don’t really need help more just wanted to point this fact out. Test 20 states: 20. Each line in create_spend_chart chart should have the same length. Bars for different categories should be separated by two spaces, with additional two spaces after the final bar.

However if you do not include the Title in your my_chart string variable and just try to print it at the beginning of the function. You will fail test 17: Title at the top of create_spend_chart should say Percentage spent by category

This means that if you try to make all of your lines the length of the title (28) you will never pass the tests as it is testing for the length of the lines within the chart, not including the title Which in my instance was (17).

I tested this several times while printing the length of each line in the terminal. The only way to pass the test was to have the title line included in the variable you have set for your chart. The title line needs to be (28) characters long, and the line length within the My_chart variable each being (17) characters long (in my instance). I spent way longer on this than I care to admit. Just wanted to pass this along if anybody gets stuck on it because it felt extremely confusing for me. I may just lack reading comprehension skills though. Good luck and Happy Coding!

Your code so far


Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36

Challenge Information:

Build a Budget App - Build a Budget App

including code snippet would be useful and then it would be more legible to us, happy coding :slight_smile:

well if i include a code snippet I am giving away the answer to how to complete the project and this would not be helpful to other users who have not yet completed the project. I thought i explained it well enough for anyone who is on the project to be able to understand. here to Satisfy the request. I will include this in the reply and if an admin wants to remove it they can. I don’t think this directly gives anything too useful away.

Spoiler

This passes the test.
Line 0: length = 28
Line 1: length = 17
Line 2: length = 17
Line 3: length = 17
Line 4: length = 17
Line 5: length = 17
Line 6: length = 17
Line 7: length = 17
Line 8: length = 17
Line 9: length = 17
Line 10: length = 17
Line 11: length = 17
Line 12: length = 17
Line 13: length = 17
Line 14: length = 17
Line 15: length = 17
Line 16: length = 17
Line 17: length = 17
Line 18: length = 17
Line 19: length = 17
Line 20: length = 17

This is all stored in one single variable
My_chart=

Percentage spent by category
100|             
 90|             
 80|             
 70|             
 60|             
 50|          o  
 40|          o  
 30|          o  
 20|       o  o  
 10|       o  o  
  0| o  o  o  o  
    -------------
     F  C  S  H  
     o  l  o  a  
     o  o  f  r  
     d  t  t  d  
        h  w  w  
        i  a  a  
        n  r  r  
        g  e  e

If you instead have every line equal to 28 to match the Title "Percentage spent by Category. You will not pass the test. If you store the Title "Percentage spent by Category in a separate variable and print it separate from My_chart variable you will not pass the test. Hope this helps.