Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CODE NEEDS TO BE IN PYTHON! CSCI 1170 (Barbosa F18) OLA 4: Input/Output, Repetition and Decision Structures Due: Monday Oct 8, 2018 by 11:59 PM-may

CODE NEEDS TO BE IN PYTHON! image text in transcribed
image text in transcribed
CSCI 1170 (Barbosa F18) OLA 4: Input/Output, Repetition and Decision Structures Due: Monday Oct 8, 2018 by 11:59 PM-may be turned in until Oct 15 by 11:59 PM with reduced points (per Open Lab Project guidance found in the course syllabus) Assignment id: ola4 Assignment type: Project Required Files: ola4 py, myout.log Lab description: For this lab, you will simulate a bank account which allows deposits, withdrawals, and repeating payments. Your program will prompt the user for a starting balance, and present a menu with the following features: If the user selects option d (for Deposit), validate the input to ensure that it is a positive number, and update the balance by adding the deposit amount. Display the amount of the deposit and the new balance. If the user selects option w (for Withdrawal), validate the input to ensure it is a positive number and, if the user has sufficient funds, update the balance by subtracting the withdrawal amount. Display the amount of the withdrawal and the new balance. If the user does not have enough money, print a message stating that the withdrawal request is denied If the user selects option r (for Repeating payments), validate the input to ensure the user has a sufficient balance and number of payments will be positive values). If the user has sufficient funds, apply each payment in turn, displaying the payment number, amount, and resulting balance at each point (see example below) If the funds are insufficient print a denial message and get the next input. . . . (you may assume that the payment amount .If the user selects option q (to Quit), print the final balance and a message wishing the user a good day. Hint: Do not handle this option inside the loop. If the user makes any other choice, print a statement to inform the user that they have chosen an invalid menu option. Requirements: .Use floating point values for all monetary amounts, and an integer for the number of payments. . All monetary values must be formatted as currency: no space between the dollar sign and the amount, use commas as thousands separators, and output 2 decimal places . The menu should be implemented by an if elif-else clause. Menu input and all validation operations must be implemented by while loops. . The repeating payment operation must use a for loop. Sample output- Your program must exactly match the output below

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

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

=+ What is the range of acceptable solutions for each issue?

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago