Need help converting my pseudocode to python, AND have a flowchart showing everything!The code:Main Module    Call InputModuleEnd Main Module Module InputModule    // This module gets input from the user    Declare Principal, AnnualRate, Years as Float     Output "Enter the Principal amount (P): "    Input Principal     Output "Enter the Annual Interest Rate (in percentage, e.g., 5 for 5%): "    Input AnnualRate     Output "Enter the number of Years to repay the loan: "    Input Years     Call DisplayPayment(Principal, AnnualRate, Years)End Module Module DisplayPayment(Principal, AnnualRate, Years)    // This module calculates and displays the monthly payment    Declare R, N as Float    Declare MonthlyPayment as Float    Declare PowerFactor as Float  // second local variable     // Calculate monthly interest rate R and number of months N    Set R = (AnnualRate / 100) / 12    Set N = Years * 12     // Calculate PowerFactor = (1 + R)^N    Set PowerFactor = (1 + R) ^ N     // Calculate Monthly Payment using the given formula    Set MonthlyPayment = [ (R * PowerFactor) / (PowerFactor - 1) ] * Principal     Output "The monthly payment is: ", MonthlyPaymentEnd Module Pseudocode helped from:https://www.bartleby.com/s/b991d593-9508-4e20-96a1-42e67c7a1d61

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.1: Assignment Operations
Problem 7E: (Civil eng.) Write an assignment statement to calculate the linear expansion in a steel beam as a...
icon
Related questions
Question

Need help converting my pseudocode to python, AND have a flowchart showing everything!
The code:

Main Module
    Call InputModule
End Main Module


Module InputModule
    // This module gets input from the user
    Declare Principal, AnnualRate, Years as Float

    Output "Enter the Principal amount (P): "
    Input Principal

    Output "Enter the Annual Interest Rate (in percentage, e.g., 5 for 5%): "
    Input AnnualRate

    Output "Enter the number of Years to repay the loan: "
    Input Years

    Call DisplayPayment(Principal, AnnualRate, Years)
End Module


Module DisplayPayment(Principal, AnnualRate, Years)
    // This module calculates and displays the monthly payment
    Declare R, N as Float
    Declare MonthlyPayment as Float
    Declare PowerFactor as Float  // second local variable

    // Calculate monthly interest rate R and number of months N
    Set R = (AnnualRate / 100) / 12
    Set N = Years * 12

    // Calculate PowerFactor = (1 + R)^N
    Set PowerFactor = (1 + R) ^ N

    // Calculate Monthly Payment using the given formula
    Set MonthlyPayment = [ (R * PowerFactor) / (PowerFactor - 1) ] * Principal

    Output "The monthly payment is: ", MonthlyPayment
End Module


Pseudocode helped from:
https://www.bartleby.com/s/b991d593-9508-4e20-96a1-42e67c7a1d61

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,