Test PR for Bernard AI #1

Open
deepkoluguri wants to merge 1 commits from test-bernard-pr into main
1 changed files with 24 additions and 0 deletions

24
agents/dummy_script.py Normal file
View File

@ -0,0 +1,24 @@
def calculate_discount(price, discount_percent):
# Bug: doesn't handle discount > 100 or negative price
discount_amount = price * (discount_percent / 100)
final_price = price - discount_amount
# Bug: syntax error logic
if final_price < 0
final_price = 0
return final_price
def divide_numbers(a, b):
# Bug: division by zero not handled
return a / b
# Hardcoded secret
API_KEY = "sk-live-1234567890abcdef1234567890abcdef"
def main():
print(calculate_discount(100, 20))
print(divide_numbers(10, 0))
if __name__ == '__main__':
main()