Skip to content

[Currency Exchange] What to do in Task 6( non_exchangable_value)? #2835

Description

@generalpy101

All my tasks are done but I don't know what to do in task 6. It says to calculate non exhangable values but I don't know how to calculate that. Can someone please provide me formula for that.
My current code :

def exchange_money(budget, exchange_rate):

    return budget/exchange_rate


def get_change(budget, exchanging_value):
   
    return budget - exchanging_value


def get_value_of_bills(denomination, number_of_bills):
    
    return denomination * number_of_bills

def get_number_of_bills(budget, denomination):
   
    return int(budget // denomination)


def exchangeable_value(budget, exchange_rate, spread, denomination):
   
    _exchange_rate = exchange_rate + exchange_rate * (spread / 100)
    res = (exchange_money(budget,_exchange_rate) // denomination) * denomination
    return int(res)


def non_exchangeable_value(budget, exchange_rate, spread, denomination):
    temp = ((budget*denomination) - exchangeable_value(budget,exchange_rate,spread,denomination))//denomination
    print(budget*denomination , exchangeable_value(budget,exchange_rate,spread,denomination))
    return int(temp)

Please ignore non_exchangable_value() function, I know it is wrong.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions