-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Add buggy python code #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: Add buggy python code #71
Conversation
|
@snipercodeai ping |
|
@ramonasuncion pong |
|
@snipercodeai help |
|
@ramonasuncion Here are the available commands:
|
|
@snipercodeai ping |
|
@snipercodeai ping |
|
@ramonasuncion pong |
|
@snipercodeai review |
|
buggy.py io.pySummaryThe provided Python script attempts to read a JSON file containing loan data and perform calculations on the data. However, there are several major issues that need to be addressed. Major Issues
Minor Issues / Suggestions
Security Concerns
Testing
Example of how the corrected code for one of the functions might look: def calculate_unpaid_loans(data):
loans = data.get("loans", [])
unpaid_loans = [loan.get("amount", 0) for loan in loans if loan.get("status") == "unpaid"]
return sum(unpaid_loans) |
No description provided.