On Fri, Dec 30, 2016 at 09:51:46PM +, angela ebirim wrote:
> class Bill(object):
>
>def tax(self, total):
> tax = float(total * 0.05)
> return round(tax, 2)
>
>def check_input(self, seat1, app1):
> try:
> seat1 = float(seat1)
> app1 = float(app1)
>
Hello,
Overall, I must say good work and your question was clear.
>Learning about how to write tests in Python and have a query.
Excellent!
I will snip everything except where I think you should look...
def check_input(self, seat1, app1):
try:
seat1 = float(seat1)
Hi,
Learning about how to write tests in Python and have a query.
*#bill.py*
class Bill(object):
def tax(self, total):
tax = float(total * 0.05)
return round(tax, 2)
def check_input(self, seat1, app1):
try:
seat1 = float(seat1)
app1 = float(app1)
except
On Fri, Dec 30, 2016 at 04:46:26PM +, Albert-Jan Roskam wrote:
> Hi,
>
>
> Why does the call to str() below return '1' and not 'one'?
Because the literals 1, 2, 3 etc are hard-coded in the interpreter to
return objects of type `int`. Shadowing the name in the builtins module
doesn't chang
On Fri, Dec 30, 2016 at 4:46 PM, Albert-Jan Roskam
wrote:
>
> Remember I only intend to use it while debugging the given script.
Have you tried hooking sys.displayhook?
> Why does the call to str() below return '1' and not 'one'? Should I implement
> __new__
> because int is immutable?
You can
Hi,
Why does the call to str() below return '1' and not 'one'? Should I implement
__new__ because int is immutable? I have a datafile that contains values and an
associated metadata file with the associated labels. I need to recode the
values. Because just using the values is a bit error prone