1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kobusy [5.1K]
4 years ago
9

Banking Account

Computers and Technology
1 answer:
satela [25.4K]4 years ago
4 0

Answer:

Here is the Python script solution.

Explanation:

#!/usr/bin/python

"""Types of bank accounts"""

# Assignment:

# Bank Account Manager - Create a class called Account which will be an abstract

# class for three other classes called CheckingAccount, SavingsAccount and

# BusinessAccount. Manage credits and debits from these accounts through an ATM

# style program.

from __future__ import print_function

def pct_to_dec(num):

"""Returns decimal version of percent"""

dec = float(num) / 100

return dec

class Account(object):

"""Creates an Account"""

def __init__(self, balance, int_rate, act_type, min_balance, **kwargs):

self.balance = balance

self.int_rate = int_rate

self.act_type = act_type

self.min_balance = min_balance

super(Account, self).__init__(**kwargs)

def __str__(self):

"""Returns formatted account type and balance"""

# Charge $25 fee if balance drops below minimum

if self.balance < self.min_balance:

self.balance -= 25

# Add interest

self.balance += round(self.balance * pct_to_dec(self.int_rate), 2)

return '{0}: ${1}'.format(self.act_type, self.balance)

class CheckingAccount(Account):

"""Creates a CheckingAccount Account"""

def __init__(self, **kwargs):

super(CheckingAccount, self).__init__(**kwargs)

class SavingsAccount(Account):

"""Creates a SavingsAccount Account"""

def __init__(self, **kwargs):

super(SavingsAccount, self).__init__(**kwargs)

class BusinessAccount(Account):

"""Creates a BusinessAccount Account"""

def __init__(self, **kwargs):

super(BusinessAccount, self).__init__(**kwargs)

# pylint: disable=C0103

ca1 = CheckingAccount(balance=500, int_rate=0.25, act_type='Checking Account',

min_balance=0)

sa1 = SavingsAccount(balance=50, int_rate=0.50, act_type='Savings Account',

min_balance=0)

ba1 = BusinessAccount(balance=4000, int_rate=0.75, act_type='Business Account',

min_balance=5000)

# Month #1 statement, initial deposits plus interest

print(ca1)

print(sa1)

print(ba1)

print('-------------')

# Month #2 statement plus interest

# Make deposit into checking

setattr(ca1, 'balance', (ca1.balance + 1000))

# Withdraw from checking

setattr(ca1, 'balance', (ca1.balance - 500))

# Make a deposit into savings

setattr(sa1, 'balance', (sa1.balance + 100))

print(ca1)

print(sa1)

print(ba1)

print('-------------')

# Month #3 statement plus interest

# Make deposit into checking

setattr(ca1, 'balance', (ca1.balance + 2500))

# Withdraw from checking

setattr(ca1, 'balance', (ca1.balance - 700))

# Make a deposit into savings

setattr(sa1, 'balance', (sa1.balance + 100))

# Make a deposit into business

setattr(ba1, 'balance', (ba1.balance + 1000))

print(ca1)

print(sa1)

print(ba1)

You might be interested in
How to make a sad face on keyboard using alt?
forsale [732]
Literally just do a colon and parenthesis :(

:( :-(
8 0
4 years ago
Read 2 more answers
he wide range of materials used to create the Buk (mask) of the Torres Strait has been interpreted as evidence of the islanders'
Kamila [148]

Answer:

The wide range of materials used to create the Buk (mask) of the Torres Strait has been interpreted as evidence of the islanders' far-reaching trade networks

C preference for local natural resources

Explanation:

The Buk (mask) aged middle to late 19th century C.E., was located in Australia, Mabuiag Island, Queensland, Torres Strait, which is between Australia and Papua New Guinea with many small mostly uninhabited islands around. Archaeological excavations show people´s  arrival at  Mabuiag islands around 7,300 years ago, being very dependent on ocean´s products to survival.

Few surviving pieces, made out of local resources materials such as turtle shell, wood, fiber, cassowary feathers, resin and paint, tell us feathers were a throughoutly artistic material used in Oceania , but  turtle shells masks were Torres Strait´s people hand-crafted and unique hallmark to be used during assorted ceremonies.

7 0
3 years ago
Omar’s teacher has asked him to send her a PDF copy of his presentation via email.
Vadim26 [7]

Answer:

1. Export

2. Create PDF/XPS document

3. Standard

4. Click Publish

Explanation:

I got wrong on edg and found the correct answer

8 0
3 years ago
Match each Excel term to its definition. cell a group of cells containing related data ribbon a row of tabs, groups, and command
Artist 52 [7]

Answer:

ribbon- a row of tabs, groups, and commands

range- a group of cells containing related data

title bar- file name

cell- a container used to input data

worksheet- Excel’s version of a spreadsheet

Explanation:

6 0
3 years ago
he wants to customize the operating system to meet his needs. what types of tools should he use, and what can he do with each?
Dennis_Churaev [7]

Answer:

remastering iso image

Explanation:

you  can add the gui, default installed program, etc

3 0
3 years ago
Other questions:
  • The ____ is designed to placeshift multimedia content; that is, to allow individuals to view their multimedia content at a more
    7·1 answer
  • Anybody play apex legends? I need somebody to climb with in comp (I main octane)
    15·1 answer
  • What is the point of having bullets points in a text box
    11·1 answer
  • Which element of the word program window contains buttons for saving a document and for undoing, redoing, and repeating a change
    5·1 answer
  • Units for measuring computer memory
    5·1 answer
  • A network that typically reaches a few meters, such as up to 10 meters (33 feet), and consists of personal devices such as mobil
    14·1 answer
  • Plz tell the answer I I'll mark u as the brainliest
    14·1 answer
  • Match the index with the value
    14·1 answer
  • assuming the default gateway is connected to the internet, what type of internet access would this server have?
    14·1 answer
  • TensorFlow and Pytorch are examples of which type of machine learning platform?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!