import json
from candy_bendy import solution

with open("40_1_tests.json") as jsonfile:
    tests = json.load(jsonfile)

'''
Fork, Test and Delete your REPL immediately
OR
Download both files and run on your own pc
'''

passes = 0
failures = 0

for test in tests:
    answer = solution(test["price_per"], test["bills"])
    if test["answer"] != answer:
        failures += 1
        print("Invalid entry")
        print(f"solution({test['price_per']}, {test['bills']})")
        print("returned:")
        print(answer)
        print("instead of")
        print(test["answer"])
        print("-----------------------------------")
    else:
        passes += 1

print(f"Passes: {passes}/{len(tests)}")
print(f"Failures: {failures}/{len(tests)}")
4ceb5fb3411a87f0f42393eb638ec1892c64c4f7
<mask token>

<mask token>
with open('40_1_tests.json') as jsonfile:
    tests = json.load(jsonfile)
<mask token>
for test in tests:
    answer = solution(test['price_per'], test['bills'])
    if test['answer'] != answer:
        failures += 1
        print('Invalid entry')
        print(f"solution({test['price_per']}, {test['bills']})")
        print('returned:')
        print(answer)
        print('instead of')
        print(test['answer'])
        print('-----------------------------------')
    else:
        passes += 1
print(f'Passes: {passes}/{len(tests)}')
print(f'Failures: {failures}/{len(tests)}')

<mask token>
with open('40_1_tests.json') as jsonfile:
    tests = json.load(jsonfile)
<mask token>
passes = 0
failures = 0
for test in tests:
    answer = solution(test['price_per'], test['bills'])
    if test['answer'] != answer:
        failures += 1
        print('Invalid entry')
        print(f"solution({test['price_per']}, {test['bills']})")
        print('returned:')
        print(answer)
        print('instead of')
        print(test['answer'])
        print('-----------------------------------')
    else:
        passes += 1
print(f'Passes: {passes}/{len(tests)}')
print(f'Failures: {failures}/{len(tests)}')

import json
from candy_bendy import solution
with open('40_1_tests.json') as jsonfile:
    tests = json.load(jsonfile)
<mask token>
passes = 0
failures = 0
for test in tests:
    answer = solution(test['price_per'], test['bills'])
    if test['answer'] != answer:
        failures += 1
        print('Invalid entry')
        print(f"solution({test['price_per']}, {test['bills']})")
        print('returned:')
        print(answer)
        print('instead of')
        print(test['answer'])
        print('-----------------------------------')
    else:
        passes += 1
print(f'Passes: {passes}/{len(tests)}')
print(f'Failures: {failures}/{len(tests)}')

import json
from candy_bendy import solution

with open("40_1_tests.json") as jsonfile:
    tests = json.load(jsonfile)

'''
Fork, Test and Delete your REPL immediately
OR
Download both files and run on your own pc
'''

passes = 0
failures = 0

for test in tests:
    answer = solution(test["price_per"], test["bills"])
    if test["answer"] != answer:
        failures += 1
        print("Invalid entry")
        print(f"solution({test['price_per']}, {test['bills']})")
        print("returned:")
        print(answer)
        print("instead of")
        print(test["answer"])
        print("-----------------------------------")
    else:
        passes += 1

print(f"Passes: {passes}/{len(tests)}")
print(f"Failures: {failures}/{len(tests)}")