Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help with python code Problem description: In this lab, you will be designing a simple application program in python to calculate simple and compound interest.

help with python code

image text in transcribed
Problem description: In this lab, you will be designing a simple application program in python to calculate simple and compound interest. The purpose of this lab is to gain experience with Python's basic data types, variables, operators, printing and formatting. Scenario: To calculate the Simple and Compound Interests, you will request the following inputs from the user with four different input statement. P = The principal amount R = The rate of interest in % (per annum) Y = Time duration in Number of year M = Number of Months Once you have the inputs, you will use the following formula to calculate Simple and Compound Interests and print them. The input and output when the program is run, has to be similar to the sample input/output provided (formatting has to be the same). For compound interest, assume that the interest is compounded annually. Simple Interest = P x N x r Compound Interest = ( P x( 1 + r ) A 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 r is obtained by dividing R by 100. The conversion works as follow: N = v + 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: o Familiarize yourself with the different Operators in python by running simple statements in python shell. 0 Use the pseudocode to write a python solution for the given task. 0 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

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 Programming questions