Hello, I have an assignment in the python program.  Professor gives me a text like this: January.txt 217283921200.5619.18,29.15,78.75,212.10100,20,410.29 The first line is an account number, the second line is the beginning balance, the third line is withdrawn and the last line is deposits. How can I separate every single line to read them. Can I use the loop function? Below is the assignment direction. Thank you very much ___________________________________________________________ Complete the following program: a) Read in and store the data from the file called “January.txt”. This file includes the customer’s account number, beginning balance, withdrawals, and deposits. (In that order) Note: Make sure you look at the file before you begin the project! b) Prompt the user for his/her name and age. c) Convert the customer’s name to a username that consists of the first letter of the first name, the first 5 digits of last name, and the customer’s age.(All letters should be lowercase) Example: Michael Jordan, age 37 should convert to: mjorda37 d) Convert the account number to the following format: XXX-XX-XXX e) Calculate the total of the deposits, the total of the withdrawals, and the ending balance in the account. f) Write a report similar to the following to both the screen and a file called “January statement.txt”: Broward College National Bank January Bank Statement                                                            Name                      UserName                 Account Number                                                            --------------------------------------------------------------------                                                            Michael Jordan          mjorda37                     217-28-392   Beginning Balance: $1,200.56 Total Withdrawals: $339.18 Total Deposits: $530.29 Ending Balance: $1,391.67   Save the file as lastname_statement.py and upload the .py file here.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 12E: (Program) Write a program that tests the effectiveness of the rand() library function. Start by...
icon
Related questions
Question

Hello, I have an assignment in the python program.  Professor gives me a text like this: January.txt

21728392
1200.56
19.18,29.15,78.75,212.10
100,20,410.29

The first line is an account number, the second line is the beginning balance, the third line is withdrawn and the last line is deposits.

How can I separate every single line to read them. Can I use the loop function?

Below is the assignment direction.

Thank you very much

___________________________________________________________

Complete the following program:

a) Read in and store the data from the file called “January.txt”. This file includes the customer’s account number, beginning balance, withdrawals, and deposits. (In that order) Note: Make sure you look at the file before you begin the project!

b) Prompt the user for his/her name and age.

c) Convert the customer’s name to a username that consists of the first letter of the first name, the first 5 digits of last name, and the customer’s age.(All letters should be lowercase) Example: Michael Jordan, age 37 should convert to: mjorda37

d) Convert the account number to the following format: XXX-XX-XXX

e) Calculate the total of the deposits, the total of the withdrawals, and the ending balance in the account.

f) Write a report similar to the following to both the screen and a file called “January statement.txt”:

Broward College National Bank

January Bank Statement

                                                           Name                      UserName                 Account Number

                                                           --------------------------------------------------------------------

                                                           Michael Jordan          mjorda37                     217-28-392

 

Beginning Balance: $1,200.56

Total Withdrawals: $339.18

Total Deposits: $530.29

Ending Balance: $1,391.67

 

Save the file as lastname_statement.py and upload the .py file here.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Function Arguments
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning