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
Mama L [17]
1 year ago
6

Python Programming

Computers and Technology
1 answer:
Phoenix [80]1 year ago
8 0

The python program that creates a Bankaccount class for a Bank ATM that is made up of the customers and has a deposit and withdrawal function is given below:

<h3>Python Code</h3>

# Python program to create Bankaccount class

# with both a deposit() and a withdraw() function

class Bank_Account:

def __init__(self):

 self.balance=0

 print("Hello!!! Welcome to the Deposit & Withdrawal Machine")

def deposit(self):

 amount=float(input("Enter amount to be Deposited: "))

 self.balance += amount

 print("\n Amount Deposited:",amount)

def withdraw(self):

 amount = float(input("Enter amount to be Withdrawn: "))

 if self.balance>=amount:

  self.balance-=amount

  print("\n You Withdrew:", amount)

 else:

  print("\n Insufficient balance ")

def display(self):

 print("\n Net Available Balance=",self.balance)

# Driver code

# creating an object of class

s = Bank_Account()

# Calling functions with that class object

deposit()

s.withdraw()

s.display()

Read more about python programming here:

brainly.com/question/26497128

#SPJ1

You might be interested in
SOLVE IN C:
RSB [31]

Answer:

#include <stdio.h>

#include <string.h>

int main(void) {

  char simonPattern[50];

  char userPattern[50];

  int userScore;

  int i;

  userScore = 0;

  scanf("%s", simonPattern);

  scanf("%s", userPattern);

  for(i = 0;simonPattern[i]!='\0';i++){

         if(simonPattern[i]!=userPattern[i]){

            userScore=i;

            break;

     }

  }

  printf("userScore: %d\n", userScore);

  return 0;

}

Explanation:

  • Use a for loop that runs until it does not reach the end of simonPattern.
  • Check whether the current index of simonPattern and userPattern are not equal and then assign the value of i variable to the userScore variable and break out of the loop.
  • Finally display the user score.
4 0
2 years ago
What is the Microsoft excel window where you work on. And it composed of three worksheet?​
antoniya [11.8K]

Answer:

work book

Explanation:

A work book is a book in MS excel which contains work sheet

4 0
2 years ago
In which type of attack do you get malicious code in links from seemingly reliable websites?
natali 33 [55]

I think it is C. cross-site scripting

6 0
3 years ago
9. h=
Nadya [2.5K]

Answer:

rs 35.6ko vrs 12. r7 3.3ko vrt 13.

6 0
2 years ago
To prevent rust from forming, a light coating of_____should be applied to all machined surfaces
Fantom [35]
What is that I never heard of that before
4 0
3 years ago
Other questions:
  • What 2 major agricultural inventions did jethro tull create?
    10·2 answers
  • Write a complete C++ program that do following. Read a positive integer from the user with proper prompt. Assume that this user
    9·1 answer
  • Write a Temperature class that will hold a temperature in Fahrenheit, and will provide methods to get and display the temperatur
    5·1 answer
  • Which computer device is used to capture or copy a photograph to place in a report?
    14·1 answer
  • According to the video, what qualities do Human Services workers need? Check all that apply.
    11·2 answers
  • Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.
    8·1 answer
  • How can forms help us reduce data-entry errors?
    12·1 answer
  • You are managing an FTP server installed in Ubuntu Server. The server has created a very large log le, vsftpd.log. Which command
    14·1 answer
  • If a triathlon is a sport combining three events, what do you think would be the word for a sport combining five events?
    7·1 answer
  • please help me to do this computer homework I beg you all please help me to get the answers please its important please ​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!