Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #101595

Need solution with this problem

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From ifeanyioprah@yahoo.com
Newsgroups comp.lang.python
Subject Need solution with this problem
Date Wed, 13 Jan 2016 08:57:20 +0300
Lines 24
Message-ID <mailman.90.1452675089.13488.python-list@python.org> (permalink)
Reply-To ifeanyioprah@yahoo.com
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding base64
X-Trace news.uni-berlin.de UDcrwh/UwyNZ4OQlrf3a2QBcxrFO9iST8bgqrqBjsq3w==
Return-Path <ifeanyioprah@yahoo.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.046
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'constructor': 0.07; 'unittest': 0.07; 'subclass': 0.09; 'accordingly.': 0.13; 'def': 0.13; '"invalid': 0.16; 'assigns': 0.16; 'bankaccount': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'withdrawal': 0.16; 'to:name:python-list@python.org': 0.20; 'subject:problem': 0.22; '8bit%:5': 0.23; 'import': 0.24; '8bit%:3': 0.27; '50,': 0.29; '8bit%:2': 0.29; 'skip:s 30': 0.31; 'class': 0.33; '8bit%:4': 0.35; 'to:addr:python-list': 0.36; 'method': 0.37; 'skip:s 50': 0.37; 'skip:s 40': 0.38; 'thank': 0.38; 'takes': 0.39; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'called': 0.40; 'from:no real name:2**0': 0.60; 'deposit': 0.61; 'subject:Need': 0.61; 'balance': 0.64; 'skip:a 40': 0.64; 'header:Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'subjectcharset:utf-8': 0.71; 'email addr:yahoo.com.': 0.84; 'subject:this': 0.85
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1452664643; bh=RaJ8nJ/I9Gm7TrZYwPe4ZJCQNSi2pJrS8dyMXbk9Ugk=; h=From:To:Subject:Date:Reply-To:From:Subject; b=RzCdtGyASvby9WTCpX+77jn5LUzBZWtJ4Hye9qAGB2xJAs0qc2UpI+IkDJKObRlIYGj8EwLh5BsbtVJPyeJ+JGmR8WaSTjyIHeacZBipLQCtClfq3aZdf+WzGw7DnUWS2zlmYLz8vdkKTktQrzAEpWKAzIWrzh/vO4tYmMwRGyT9VhShyTjqOc/qS/2cp05fY56k/v4Z4TWFvPH3EvB1A504NlT99kAO3ch0vKWDmLm/7RUPfGkzHczMaDB5PAsLASGRTwwKb0DE6q2RUYW0ONqN3f6Y5UjcPv6IwzgsIp81DfeIueUZTkvBwb7z6BfZPXhp7AoYV6pxucIWGe8Ruw==
X-Yahoo-Newman-Id 141600.20065.bm@smtp105.mail.ne1.yahoo.com
X-Yahoo-Newman-Property ymail-3
X-YMail-OSG 9i5SBiYVM1lJ3a0y0w76ajHoik7nhKZHAwu9pJ5FN9tUnGL ROc_3myhUaGh.OEuRzsVmDYKVMoBL4ZGaqQwNySfaMWtuQXSnSoGxojUq2Xg y93gKW7SB7vVvy06hGa..52.xj2kh4vDN_UHtCOC6ZAyIuQOMsYhQAeXUMpF 2jOL97ccinZSXjcySaC1aD3.lkwUFtyGC5iqZVJQqz1AVyMufZMzHomoclMb zGaEUcLX_OrB1hDMxh.5PCA1qHstqb_UwhS3p1ZB32U0_XvJiipbOM..cL9D wYquBgEr0kVUkdveT19qJjIelKBa.rlEwwt8rmHlANtC.wV6oBPWrPM4pNC7 RsMC8Px32G4dM4Nj6GGYsUYVQHHJbQqkM6xbcLVKrLmocMLA7uAFoj9xVqE. 5uE0QZCAGQYcCxULnOYvB777YnJVogw8KIoswJoLpQlIdIRCYtHRJiNsglYR oEStV2OCbsgzcqCf2B7RRLI_ja9g6tbi6ztjnLUPqYSnI40PBXURxKdUMAnE BASc9hy0ODYRpQ300mdXALUh3MOOjBrMPrg--
X-Yahoo-SMTP nvpq5pGswBCnV1oqgkwAqPgSq3K9V0gXEQ--
X-Mailer Mail.Ru Mailer 1.0
X-Originating-IP [104.236.166.63]
X-Letter-Fingerprint 4goWRFlFoWrbB7u5BmZ79zlkbagwOCNF
X-Priority 3 (Normal)
X-Mras Ok
X-Spam undefined
X-Mailman-Approved-At Wed, 13 Jan 2016 03:51:28 -0500
X-Content-Filtered-By Mailman/MimeDel 2.1.20+
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:101595

Show key headers only | View raw


Create a class called BankAccount­
Create a constructor that takes in an in­teger and assigns this to a `balance` pr­operty.
Create a method called `deposit` that ta­kes in cash deposit amount and updates t­he balance accordingly.
Create a method called `withdraw` that t­akes in cash withdrawal amount and updat­es the balance accordingly. if amount is­ greater than balance return `"invalid t­ransaction"`
Create a subclass MinimumBalanceAccount ­of the BankAccount class
import unittest class AccountBalanceTest­Cases(unittest.TestCase): def setUp(self­): self.my_account = BankAccount(90)
def test_balance(self): self.assertEqual­(self.my_account.balance, 90, msg='Accou­nt Balance Invalid')
def test_deposit(self): self.my_account.­deposit(90) self.assertEqual(self.my_acc­ount.balance, 180, msg='Deposit method i­naccurate')
def test_withdraw(self): self.my_account­.withdraw(40) self.assertEqual(self.my_a­ccount.balance, 50, msg='Withdraw method­ inaccurate')
def test_invalid_operation(self): self.a­ssertEqual(self.my_account.withdraw(1000­), "invalid transaction", msg='Invalid t­ransaction')
def test_sub_class(self): self.assertTru­e(issubclass(MinimumBalanceAccount, Bank­Account), msg='No true subclass of BankA­ccount')
Thank you.....­
Pls need assistance. My email : ifeanyioprah@yahoo.com.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Need solution with this problem ifeanyioprah@yahoo.com - 2016-01-13 08:57 +0300

csiph-web