Hands-On Coding II

Get some hands-on practice with the concepts we have learned so far.

In this project lesson, we will use the knowledge about Python we have gained so far and make an ATM system for a single person. The ATM will contain the following functions:

  1. Balance check

  2. Cash deposit

  3. Cash withdrawal

Defining the main function

It is a good idea to define the main() function in the early stages of the project, as it allows us to build the project in a modular, easy-to-follow, and easy-to-fix manner. Let's start off by defining the main() function and populating it with the required variables. No worries if we define all of the variables required for the project; we can just define the ones that we can think of right now and later add new ones if required.

For the ATM system that contains data for a single person, we need to define the name of the person, their account balance, and a PIN for security. Please define the main() function in the space provided below and define the required variables.

After we take the input, the program does nothing else. So, to indicate that the program has ended, we can also print a message at the end of the main() function.

Get hands-on with 1400+ tech skills courses.