Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can someone help me with the word problem #3 and #5 PE in chapter 9 of Programmi

ID: 3767067 • Letter: C

Question

Can someone help me with the word problem #3 and #5 PE in chapter 9 of Programming Logic and Design by Joyce Farrell problem statement: #3 Create the logic for a program that calculates and displays the amount of money you would have if you invested $5000 at 2 percent simple interest for one year. Create a separate method to do the calculation and return the result to be displayed. #5 Create the logic for a problem that performs arithmetic functions. Design the program to contain two numeric variables, and prompt the user for values for the variables. Pass both variables to methods named sum() and difference(). Create the logic for the methods sum and difference(); they compute the sum of and difference between the value of two arguments, respectively. Each method should perform the appropriate computation and display the results. Please post answers in English (pseudocode). Please do not use any specific programming language.

Explanation / Answer

Answer for Question A is below: Pseudo Code for Calculate the Simple Interest algorithm

start
Declarations
num balance
balance = computeBalance()
output "After one year the balance is", balance
stop
balance = computeBalance()
num computeBalance()
Declarations
num balance
num PRINCIPAL = 5000
num INTEREST_RATE = 0.02
balance = PRINCIPAL * (1 + INTEREST_RATE)
return balance

Answer for Question B is below: Pseudo Code for sum and difference algorithm

function sum(var A, var B)
   Declarations
   num result
   result = A + B
   output "After Performing Sun Operation Result is :", result
   return
  
function difference(var A, var B)
   Declarations
   num result
   result = A - B
   output "After Performing Difference Operation Result is :", result
   return ;
  
Start main method
Declarations
num A,B,
read A
read B
sum(A, B)
Difference(A,B)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote