Scientific Computing with Python Projects - Budget App

Tell us what’s happening:
I dont know what I am doing wrong in create_spend_chart class

Your project link(s)

solution: boilerplate-budget-app - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54

Challenge: Scientific Computing with Python Projects - Budget App

Link to the challenge:

The spec requires

Besides the Category class, create a function (outside of the class) called create_spend_chart that takes a list of categories as an argument. It should return a string that is a bar chart.

You have created a class to that effect. The tests are expecting a string returned from a function and are getting an object returned from the class constructor.

but how from init I cannot return anything and I tried str it still gave me some error

Run your create_spend_chart with the same arguments as the test does and print the type of the return value. Printing the return will print the result from the __repr__() method since it’s defined.

Regardless, the spec calls for a function that returns a string.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.