I keep getting attributeError .
Please look at my codes below,
I am just following the solution of the lecturer to understand.But the attribute error I get is stealing the fun I should be having in learning python. Please I need help!
![image.png](https://365datascience.com/resources/qa-hub/thumb@1170_vmutylcf4n.webp)
3 answers ( 0 marked as helpful)
Hi Martin,
I replicated your code, and I think your error was caused by wrong indentation. Make sure to align all the attributes and methods def,
unless they would only be defined inside another method/attribute. In OOP however, I think it's not ideal.
![image.png](https://365datascience.com/resources/qa-hub/thumb@1170_qt6sgod9f6c.webp)
If this helps, you can also help me back by upvoting my answer. It can help me in getting extra XPs.
Kind regards,
Carl
Kindly help check my code
![image.png](https://365datascience.com/resources/qa-hub/thumb@1170_1w3qp1kpcxe.webp)
Hello Gabriel,
I believe the error was caused by how you named the Bank_Account class then you define its class as "BankAccount" without the "_".
Also noticed that your other methods would cause the same error, so just type and use the names consistently to avoid it, i.e., when you define a function "my_function()", you must also call it as is.