Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IT 109 BWA-1 Due: 2/21 2020 11:59 PM IT 109 BWA - 1 Due: 2/21 2020 11:59 PM Problem description: In this lab, you will

image text in transcribed

IT 109 BWA-1 Due: 2/21 2020 11:59 PM IT 109 BWA - 1 Due: 2/21 2020 11:59 PM Problem description: In this lab, you will be designing a simple application porgram in python to calculate simple and compound interest. The purpose of this lab is to gain experience with basic Python data types, variables, operators, printing and formating and basic 1/0 operations. Testing with different input: Finally, when you have the code ready, test it using different inputs. Verify the result by hand calculating the expected results. Also try invalid inputs which break your program or give weird results e.g. Negative values or giving no inputs. Don't worry if your solution breaks when you provide invalid inputs. You will learn how to fix it in later assignments Scenario: To calculate the Simple and Compound Interests, you will request the following inputs from the user. Submission: P = The principal amount R = The rate of interest in % (per annum) Y = Time duration in Number of year M = Number of Months 1. All submission will be via BlackBoard by the due date. 2. You are required to use the template file firstname_lastname_BWA1.py for submission. Please replace the firstname and lastname with your first and last name 3. Change the header of the template file accordingly. 4. This is an individual work and no collaboration is allowed. Once you have the inputs, you will use the following formulae to calculate Simple and Compound Interests and print them. For compound interest, assume that the interest is compounded annually. Sample 1/0: Simple Interest = PxNxr Compound Interest = (P X (1+r)^N)-P Before applying the formulae to the inputs, you need to perform appropriate conversions. Please note that the formulae replace M, Y and R with N and r. Where N is the time period in years obtained by combining Y (years) and M (months). Therefore, N will have a fractional part if M is non-zero. Similarly ris obtained by dividing R by 100. The conversion works as follow: Enter the principal amount: 1000 Enter interest in % (per annum): 5 Enter Time duration in Number of year: 1 Enter Number of Months: 5 Simple Interest: 70.83 Compound Interest: 71.56 N = Y + M/12 r=R/100 Procedure: Design Your Solution: Before you start coding, think about the inputs, outputs and processing, and design your solution. Write down your pseudocode. You are required to include the pseudocode in your submission. Refer to grading rubric on the last page for grading guidelines. Coding: Use the pseudocode to write a python solution for the given task. But, before that, familiarize yourself with the different operators in python by running simple statements in python shell. Once you develop an understanding of the basic constructs that you will be using in your code, you will be more confident in using them in your program. Use meaningful variable names and provide appropriate prompts for the input and output statements. Look at example solutions in your lab slides. And don't forget to use comments where necessary

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

Students also viewed these Databases questions

Question

Find the eigenvalues. Find the corresponding eigenvectors.

Answered: 1 week ago