Daily Coding Challenge - Streaming Cost

Tell us what’s happening:

While all other tests pass, test #6 fails with a rounding error that returns 50.35 instead of 50.36. I could only satisfy this test with a fudge…
if round(cost,2) == 50.35 : cost += 0.01
Copilot tells me there is no sane solution to satisfy all tests by producing the expected results.

Your code so far

def get_streaming_bill(cart, subscription):

    return cart

Your browser information:

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

Challenge Information:

Daily Coding Challenge - Streaming Cost

https://www.freecodecamp.org/learn/daily-coding-challenge/2026-06-18

GitHub Link: https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/daily-coding-challenge/6a15cadf5f240d05a2649556.md

there is an issue with the challenge, it has been reported here

btw, there is a way, each challenge contains a solution that passes the tests for testing purposes

It works with (acc.toFixed(2) * subscription).toFixed(2)

All tests

Apparantly taking ths sum of the basic costs first and then multiplying with the discount, and taking the sum of each of the basic costs multiplying with the discount (the way the solution applies), produce different results after rounding.

I think there’s an other issue with the challenge, particularly the Python side. In all test cases format and type are used as keys of dictionary, rather than the strings “format” and “type”. While in normal Python environment it’s permissable to use bulit-in functions or methods as keys of dictionary, apparently it’s not in the test environment. Codes calling item[format] or item[type] result in key error and failures in all tests. Even the solution in the challenge page of Github fails all tests, as it uses item[“format”] and item[“type”] and doesn’t match the keys used in the tests.

In the github page the code is incomplete. Check this Daily Coding Challenge - Streaming Cost

thank you, you are right, that has already been reported