The purpose of this project is to demonstrate an acceptable level of expertise with the basic programming concepts/techniques and Python syntax addressed through the semester. This includes (but is not necessarily limited to): data types, variables, operators, expressions, statements, I/O operations, user-defined and built-in functions, modules and control structures, dictionary and files. The source code should be written in the template files that are being provided with the header and above specification. Details code comments

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

The purpose of this project is to demonstrate an acceptable level of expertise with the basic programming concepts/techniques and Python syntax addressed through the semester. This includes (but is not necessarily limited to): data types, variables, operators, expressions, statements, I/O operations, user-defined and built-in functions, modules and control structures, dictionary and files.

The source code should be written in the template files that are being provided with the header and above specification. Details code comments are provided in the given files

Input file: The program starts with reading in all user information from a given input file. The input file contains information of a number of users in the following order: username, first name, last name, password, miniVenmo account number and account balance. Information is separated with ‘|’. o username is a unique information, so no two users will have same username. Sample input file: User gmason has password 123456, account number of BB12 and balance of $1000.  Program flows as below: 1) data is read in from the given input file, 2) it will be saved to a dictionary referred as users where each key is username and the value will be a list containing rest of the information: first name, last name, password, account number and account balance. One example of key-value pair is: 'gmason': ['George', 'Mason', '123456', 'BB12', 1000.0]. 3) user will be presented with a menu and all the operations related to menu options will be performed on this users dictionary.  Main Menu: The program starts with a welcome message and displays main menu. Main menu contains following different options for a user: Main Menu 1. New User 2. Existing User Sign In 3. Exit Following is description of all the options. Black refers to user input and blue is program generated message/options. For better understanding, some comments in orange italics are added surrounded by triangle brackets <>, these are not program generated messages.

MAKE SURE TO FOLLOW THE STRUCTURED CODE BELOW

 

AND THE TEXT FILE THAT NEEDS TO BE USED

gmason|George|Mason|123456|BB12|1000 gwash|George|Washington|45678910|AB45|900

user_list.txt

IMAGES POSTED APPLICATION.PNG AND UTILITY.PNG USE SCREENSHOTS TO STRUCTURE CODE

Here is the transcription of the code in the image, formatted for an educational website:

---

```python
import random, string

def is_username_taken(username, users):
    """
    Returns False if username already exists in users (dictionary)
    otherwise returns True
    """
    #your code here

def validate_username_password(username, password, users):
    """
    Returns False if username and password do not match or username 
    does not exist, otherwise returns True
    """
    #your code here

def new_user(users):
    """
    Creates a new miniVenmo user with first name, last name, username 
    password, random miniVenmo Account number, initial balance.
    Returns None
    """
    print('\nNew user')
    first_name = input('Enter first name: ')
    last_name = input('Enter last name: ')
    username = input('Enter username: ')

    # Check if username is taken
    if username in users:
        # if username already taken -> print a message and go back to while
        # statement for password and break
        generate_account_number()
    # Ask for other information
    # Add key-value pair to the dictionary users

def validate_existing_user(users):
    """
    Existing user needs to validate with username and password and 
    maximum chances is three. Returns username if login successful
    otherwise returns false if maximum chances are used.
    """

    max_chance = 0
    # your code here

def validate_amount(users, username, amount):
    """
    Returns True if amount to withdraw is less than the 
    current miniVenmo balance otherwise returns False
    """
    # your code here

def deposit(users, username, amount):
    """
    Deposits amount to user's miniVenmo Account and prints 
    informational message
    """
    # your code here

def withdraw(users, username, amount):
    """
    Withdraws amount from user's miniVenmo Account if amount 
    is valid otherwise prints informational message
    """
    # your code here

def summary(users, username):
    """
    Displays current summary of a user Account
    """
    # your code here

def send_money(users, sender, receiver, amount):
    """
    Sends money from sender (username) to receiver (username) 
    if amount is valid AND if receiver username exists
    """
    # your code here

def generate_minivEnmo_account_number():
Transcribed Image Text:Here is the transcription of the code in the image, formatted for an educational website: --- ```python import random, string def is_username_taken(username, users): """ Returns False if username already exists in users (dictionary) otherwise returns True """ #your code here def validate_username_password(username, password, users): """ Returns False if username and password do not match or username does not exist, otherwise returns True """ #your code here def new_user(users): """ Creates a new miniVenmo user with first name, last name, username password, random miniVenmo Account number, initial balance. Returns None """ print('\nNew user') first_name = input('Enter first name: ') last_name = input('Enter last name: ') username = input('Enter username: ') # Check if username is taken if username in users: # if username already taken -> print a message and go back to while # statement for password and break generate_account_number() # Ask for other information # Add key-value pair to the dictionary users def validate_existing_user(users): """ Existing user needs to validate with username and password and maximum chances is three. Returns username if login successful otherwise returns false if maximum chances are used. """ max_chance = 0 # your code here def validate_amount(users, username, amount): """ Returns True if amount to withdraw is less than the current miniVenmo balance otherwise returns False """ # your code here def deposit(users, username, amount): """ Deposits amount to user's miniVenmo Account and prints informational message """ # your code here def withdraw(users, username, amount): """ Withdraws amount from user's miniVenmo Account if amount is valid otherwise prints informational message """ # your code here def summary(users, username): """ Displays current summary of a user Account """ # your code here def send_money(users, sender, receiver, amount): """ Sends money from sender (username) to receiver (username) if amount is valid AND if receiver username exists """ # your code here def generate_minivEnmo_account_number():
```python
import firstname_lastname_final_project_utility as u #change the name of the file

def build_dict():
    '''
    Returns a dictionary created from input file (user_list.txt)
    where key is an existing username and
    value is a list of firstname, lastname, account number and balance.
    '''
    #your code here

def write_to_file(users):
    '''
    Writes the updated user information to user_list.txt file
    '''
    #your code here
    #call this function from Exit option

def main():
    print('\n********** Welcome to miniVenmo! ***************')
    users = build_dict()
    option = 0
    QUICK_TRANSFER_TO_BANK_AMOUNT = 20

    while option!=3: #outer loop - main menu option
        #your code here
        #display main menu options
        option = int(input('Enter option (1-3): '))

        if option == 1:
            u.new_user(users) #create new user

        elif option == 2:
            username = u.validate_existing_user(users)

            if username: #if username is not False
                while True: #inner while loop - sub menu option
                    #your code here
                    #display sub menu option
                    submenu_option = int(input('Enter option (1-6): '))
                    if submenu_option == 1:
                        #your code here
                        #define try-except block
                        #ask for amount to deposit
                        #Invalid amount will deposit  #Invalid amount (exception) will take the user to the main menu

                    elif submenu_option == 2:
                        #your code here

                    elif submenu_option == 3:
                        #your code here

                    elif submenu_option == 4:
                        #your code here

                    elif submenu_option == 5:
                        #your code here

                    elif submenu_option == 6:
                        print('Signing out. Returning to main menu. ')
                        break #break out of sub-menu option

                    else:
                        print('Invalid Option. Returning to main menu. ')

        elif option == 3:
            #your code here

        else:
            print('Invalid option! Returning to main menu. ')

if __name__ == '__main__':
    main()
```

**Explanation:**

1. **Import Statement:**
   - Imports a utility module for handling certain functionalities, suggesting that you should rename
Transcribed Image Text:```python import firstname_lastname_final_project_utility as u #change the name of the file def build_dict(): ''' Returns a dictionary created from input file (user_list.txt) where key is an existing username and value is a list of firstname, lastname, account number and balance. ''' #your code here def write_to_file(users): ''' Writes the updated user information to user_list.txt file ''' #your code here #call this function from Exit option def main(): print('\n********** Welcome to miniVenmo! ***************') users = build_dict() option = 0 QUICK_TRANSFER_TO_BANK_AMOUNT = 20 while option!=3: #outer loop - main menu option #your code here #display main menu options option = int(input('Enter option (1-3): ')) if option == 1: u.new_user(users) #create new user elif option == 2: username = u.validate_existing_user(users) if username: #if username is not False while True: #inner while loop - sub menu option #your code here #display sub menu option submenu_option = int(input('Enter option (1-6): ')) if submenu_option == 1: #your code here #define try-except block #ask for amount to deposit #Invalid amount will deposit #Invalid amount (exception) will take the user to the main menu elif submenu_option == 2: #your code here elif submenu_option == 3: #your code here elif submenu_option == 4: #your code here elif submenu_option == 5: #your code here elif submenu_option == 6: print('Signing out. Returning to main menu. ') break #break out of sub-menu option else: print('Invalid Option. Returning to main menu. ') elif option == 3: #your code here else: print('Invalid option! Returning to main menu. ') if __name__ == '__main__': main() ``` **Explanation:** 1. **Import Statement:** - Imports a utility module for handling certain functionalities, suggesting that you should rename
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education