Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This needs to be for Codio Python 3 Challenge For your final challenge in this unit, you will load two files. The first file F1

This needs to be for Codio Python 3

Challenge

For your final challenge in this unit, you will load two files. The first file F1 will have information about some accounts. It will be pipe-delimited and have one record per line, with these fields:

ACCOUNT NUMBER | PIN CODE | BALANCE

The second file F2 will contain instructions: one on each line.

The instructions will look like this:

COMMAND | AMOUNT | ACCOUNT NUMBER | PIN CODE

COMMAND will be either add or sub. If the command is add you will add AMOUNT to the BALANCE in the account files F1. If the command is sub, you will subtract.

However, there are a number of reasons for which you may need to reject the transaction. If you are asked to subtract an amount that would put the account below zero or if the pin code you are provided does not match the pin code in the account record, the transaction is ignored.

Account Transactions

Given pipe-delimited files F1 and F2 where F1 contains accounts with fields ACCOUNT NUM|PIN|BALANCE and F2 contains transaction instructions COMMAND|AMOUNT|ACCOUNT NUM|PIN, execute the transactions, storing the results back in F1.

The COMMAND field will be add or sub indicating addition or subtraction from the account.

Transactions which do not provide the correct PIN code or attempt to put the account below zero should be ignored.

image text in transcribed

CollapseData formats 5. 6. Final challenge For your final challenge in this unit, you will load two files. The first file F1 will have information about some accounts. It will be pipe-delimited and have one record per line, with these fields: ACCOUNT NUMBER I PIN CODE BALANCE The second file F2 will contain instructions: one on each line. The instructions will look like this: COMMAND I AMOUNT ACCOUNT NUMBER 1 PIN CODE COMMAND will be either add or sub If the command is add you will add AMOUNT to the BALANCE in the account files F1. If the command is sub ,you will subtract. However, there are a number of reasons for which you may need to reject the transaction. If you are asked to subtract an amount that would put the account below zero or if the pin code you are provided does not match the pin code in the account record, the transaction is ignored CollapseData formats 5. 6. Final challenge For your final challenge in this unit, you will load two files. The first file F1 will have information about some accounts. It will be pipe-delimited and have one record per line, with these fields: ACCOUNT NUMBER I PIN CODE BALANCE The second file F2 will contain instructions: one on each line. The instructions will look like this: COMMAND I AMOUNT ACCOUNT NUMBER 1 PIN CODE COMMAND will be either add or sub If the command is add you will add AMOUNT to the BALANCE in the account files F1. If the command is sub ,you will subtract. However, there are a number of reasons for which you may need to reject the transaction. If you are asked to subtract an amount that would put the account below zero or if the pin code you are provided does not match the pin code in the account record, the transaction is ignored

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions