Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Ask your questions and receive accurate answers from professionals with extensive experience in various fields on our platform. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

I have this assignment for class to develop a python program from the pseudocode I am listing below. (Its under the instructions for the python assignment)
To complete this question, you will develop a python program that will determine how many years until retirement and how much is still needed to save.
To complete this program successfully the program must be designed to collect the following inputs from the user:
Full Name
Current Age
Desired Retirement Age
Current Level of Retirement Savings
What Is the Total Amount of Retirements Savings Is Needed at Retirement
Finally, the program will need to output a simple statement (or statements) that show the name, how many years left to retirement and how much needs to be saved to reach your retirement goals.
Input your full name
Input your current age
Input your desired retirement age
Calculate the number of years until retirement age (desired retirement age - current age)
Input your current retirement savings
Input the amount you need to retire
Calculate the amount needed to be saved by retirement age (amount needed to retire - current retirement savings)
Display full name
Display the message "The number of years until retirement age are" number#.
Display the message "The amount needed to be saved by retirement age is" amount#
Stop

Sagot :

JunRR

Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis.

What is the basics of Python?

  • Python has a simple syntax similar to the English language. Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
  • Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
  • Python is an interpreted, object-oriented, high-level programming language with dynamic semantics developed by Guido van Rossum. It was originally released in 1991. Designed to be easy as well as fun, the name "Python" is a nod to the British comedy group Monty Python.
  • Algorithms are used as prototypes of an actual program, and they are not bounded by the syntax of a programming language.

#Prompt user for input

length = float(input("Length of the edge: "))

#Calculate the area of a side

Area1 = length * length

#Calculate the area of the cube

Area2 = 6 * Area1

#Calculate the volume

Volume = Area1 * length

print("Length: "+str(length))

print("Area of a side: "+str(Area1))

print("Area of the cube: "+str(Area2))

print("Volume: "+str(Volume))

The flowchart , pseudocode and python program start by requesting for user input;

This user input is saved in variable length

  • The surface area of a face is calculated by length * length and saved in Area1; i.e. Area1 = length * length
  • The surface area of the cube is calculated by 6 * Area1 and saved in Area2. i.e. Area2 = 6 * Area1 = 6 * length * length
  • The volume of the cube is calculated by Area1 * length and saved in volume. i.e. Volume = Area1 * length = length * length * length
  • After the surface area of one side of the cube
  • The surface area of the whole cube  and the volume of the cube are calculated; the program then prints the user input (length) and each of the calculated parameters.

To learn more about python program refer to:

https://brainly.com/question/24793921

#SPJ4