Question

In: Computer Science

Programming can be used to assist users in completing complex calculations very quickly. As seen in...

Programming can be used to assist users in completing complex calculations very quickly. As seen in class practices, we were able to calculate the area of geometric shapes, figure out the amount of calories in cookies, and even calculate a restaurant bill.
For this assignment, you will take input from the user to provide interactive messages and to solve the following word problem:
Engineers often need to convert between different types of units to perform calculations that follow standard formulas. One conversion that is very common involves converting distances. List the steps, by writing pseudocode, that explains how you would ask the user to provide the distance in miles and would display: 1) The distance in kilometers, 2) the distance in feet, 3) the distance in yards.
Example:
The program asks the user to provide their name and displays a greeting message that explains its purpose. The program requests the distance in miles. The user provides the number 158 for miles. The program calculates and displays the results of: 1) 254.28 kilometers, 2) 834240 feet, 3) 278080 yards

Your Task:
For now, we are not going to do any programming! You must understand that you should plan your code. Planning your code saves you time in the long run and allows you to use the solution in any programming language.
For this part of your project, you must write pseudocode explaining the steps that you will take to create the program described above.
Remember that pseudocodes involve absolutely no Python yet.
Remember that in a PSEUDOCODE we should identify the: 1) Input, 2) Process, 3) Output

using pseudocode and give me the process and programming

Solutions

Expert Solution

First of all lets try to understand the steps that are involved here:

step 1: Display a message to user asking the to provide their name and then Get the input of their name.

step 2: Display a greeting message with user's name along with description about the program and its purpose. And also ask then to enter the distance in Miles.

step 3: Get the input from the user and store it in a variable and then calculate distance in other units using below conversion factors:

  • miles to km- KM=1.609* MILES , as 1 mile = 1.609 kms
  • miles to feet- FEET= 5280* MILES , as 1 mile = 5280 feets
  • miles to yards- YARDS = 1760* MILES , as 1 mile = 1760 yards

After calculating these values,

step 4: Display or print the values in required form i.e., 1) KM kilometers 2) FEET feets 3) YARDS yards

Now, the pseudocode would be as follow:(#note that MILES, KM,FEET and YARDS are variables of float or decimal type.)

  1. START
  2. Display(/Print) " Hello, please enter your name"
  3. Enter(/Input) USERNAME // stores username
  4. Display(/Print) "welcome USERNAME, Enter the distance in miles to get it converted into kilometers, feet and yards."
  5. Enter(/Input) MILES // distance in miles
  6. KM = 1.069 * MILES // calculate and store distance in KM
  7. FEET = 5280 * MILES // to calculate and store distance in FEET
  8. YARDS = 1760 * MILES // to calculate and store distance in YARDS
  9. Display(/Print) "distances are 1)KM kilometers \n 2)FEET feets \n 3)YARDS yards"
  10. STOP/END

if still having any doubt feel free to ask in comments.

Don't forget a thumbs up,

thank you.


Related Solutions

ASC 280 focuses on providing financial statement users with information that can assist them in determining...
ASC 280 focuses on providing financial statement users with information that can assist them in determining an entity's risks and potential returns. ASC 280 also discusses the concept of "enterprisewide disclosure" standards to further the amount of information provided to end users. Using the FASB Codification System as your reference, research ASC 280 and explain how it might be useful in presenting information that could be pertinent to an end user. From an ethical perspective, what would result if this...
Public policy can be seen as the result of “complex negotiations” between contesting groups, while others...
Public policy can be seen as the result of “complex negotiations” between contesting groups, while others consider it as the proffered outcome of authority. There are varied views at work here and a corresponding form of state which ones of the latter do you think are at play and why? no plagiarism must be 2 to 2 1/2 page double space answer
Which of the following statements is correct? Monetary policy decisions can be made very quickly. Monetary...
Which of the following statements is correct? Monetary policy decisions can be made very quickly. Monetary policy, once implemented, is immediately effective. The Fed usually foresees macroeconomic problems. Monetary policy takes a long time to be implemented. To reduce unemployment, which of the following monetary policy action could be effective in the short run? Decrease interest rate Decrease money supply Increase reserve requirement Selling bonds What kind of monetary policy can be used to reduce the rate of inflation? Selling...
As seen during our class, the WBS can be a very powerful tool to define clearly...
As seen during our class, the WBS can be a very powerful tool to define clearly what is the scope of your project. I propose you to choose a real and simple project from your professional or personal life and perform the following activities: •Define what is your project (it can be anything you want) and what is the product, service or result expected from it •Document the requirements of the product or service created by your project •Then represent...
Describe significance of the ecological footprint and how it can be used to assist in sustainable...
Describe significance of the ecological footprint and how it can be used to assist in sustainable engineering practise.
One area worth discussing is how quickly a trivial social media post can become a very...
One area worth discussing is how quickly a trivial social media post can become a very loud voice of the company. How do you think a crisis management plan related to social media could have been developed beforehand to save some of these companies from their mistakes. Are companies investing enough in talented and trained staff members to manage their social media presence? Have you seen other corporate social media blunders that we have not yet discussed in class?
Can someone assist with capsim simulation round 5? Doing very poorly and looking for recommendations on...
Can someone assist with capsim simulation round 5? Doing very poorly and looking for recommendations on what we are doing incorrectly.
how Quickbooks can be used to assist companies in maintaining ethical and professional standards.
how Quickbooks can be used to assist companies in maintaining ethical and professional standards.
Explain how the ABS Labour Force Survey can be used by an organisation to assist in...
Explain how the ABS Labour Force Survey can be used by an organisation to assist in workforce planning.
There is something about faces, we can usually identify them very quickly, under many different conditions,...
There is something about faces, we can usually identify them very quickly, under many different conditions, however there are known variables which affect this ability. Two conditions “target present” and “target absent” are an important feature of face detection and recognition studies. There is, however, no suggestion that accuracy of identification might vary depending on whether or not the target is available. Analyse some data from a simple face recognition experiment, where participants were shown 20 short video clips of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT