#I don't know what to do?
26 messages · Page 1 of 1 (latest)
Could you share your code and the error using a codeblock? Images are hard to read and harder to copy paste text from.
Increase your chance of getting help and look like a pro by sharing codeblocks not images. For example, you can type the following. Note, the ``` must be on their own line.
```
for number in range(10):
total += number;
```
Discord will render that as so:
for number in range(10):
total += number;
Click here to learn more about codeblocks: https://exercism.org/docs/community/being-a-good-community-member/writing-support-requests and http://bit.ly/howto-ask
```
Paste code here
```
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_numbers_of_bills(amount,denomination):
return int(amount/denomination)
def get_leftover_of_bills(amount,denomination):
return (amount/denomination)-get_numbers_of_bills(amount,denomination)
def exchangeable_value(budget,exchange_rate,spread,denomination):
exchange_rate+=exchange_rate*(spread/100)
return int((budget/exchange_rate)/denomination)*denomination
What are you stuck on?
they give me an error
Ah. You're getting an error? Could you share the error using a codeblock?
Hint: make sure your test modules.packages have valid Python names.
Traceback:
: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
: in <module>
from exchange import (
E ImportError: cannot import name 'get_number_of_bills' from 'exchange```
It looks like your error message got cut off
The error shows cannot import name 'get_number_of_bills'
Does your code have a function named get_number_of_bills? You may want to use the Ctrl-F find to check that.
yes
Can you copy/paste the get_number_of_bills line from your code?
Or, better yet, copy/paste get_number_of_bills into Ctrl-F
return int(amount/denomination) ```
When I search that for get_number_of_bills it says zero matches
>>> "get_number_of_bills" in "def get_numbers_of_bills(amount,denomination):\n return int(amount/denomination)"
False
I discover the problem
🥳
with the s
def get_numbers_of_bills(amount,denomination):
return int(amount/denomination)
thank you
You're welcome