Python Math problem

I have a problem . I have to 2 notes ( 20 and 50 dollars). They must total 3,810 dollars. The catch is that there are only 135 notes(bills). I must find out how many
20 dollar bills there are.
Here is what I have

bills = [20, 50]

noteCounter = [0,0]

amount = 3810

for i, j in zip(bills, noteCounter):

    if amount >= i:

        j = amount // i

        amount = amount - j * i

        print(i, " : ", j)


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

There are two algebraic equations.

One describes the total number of bills and the other describes the total dollar value of the bills.

With these two equations and two unknown values, you can directly solve for the number of bills of each denomination with algebra. There should be no loops required.