Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Can you help me with PSEUDOCODE ?
Okay so our computer teacher gave us a project about Pseudocode and what's really annoying about it is that he didn't even teach us anything about it. So now I'm trying to read how Pseudocodes are written and I need help understanding them. I saw a couple of exercises that I was interested to answer in so I could know if I really understand Pseudocode. B-But right now I'm just really confused with it and would like to know how these will be answered:
1. Write a Pseudocode for a program that accepts an amount entered. Then, determine the discount rate allowed; 20% would be given to any purchase of more than $1000, 10% to purchase of more than $500 (inclusive). Display the discount given and also the amount after the deduction of the discount.
2. Assume you have a bank account that compounds interest on a yearly basis. For examples, if you deposit $100 for 2 years 4% interest. At the end of the year you will have $104. At the end of 2 years, you will have the $104 plus 4% of that, or $108.16. Write the Pseudocode for a program that would read in a deposit amount, a term, and an interest fate, and print out your total for each year of the term.
3. The user would be prompted after each person, if he / she wishes to enter more names. The program continues to run until the user enters "No" on "N".
Serious answers please D: I need to understand Pseudocode beacuse the deadling for our project is in 3 days. And in case your wondering, these aren`t the questions to the project. These are just the exercises listed in the book. I need to know how to answer these because I know It's the only way I could fully understand them. ( That's how I learn something ever since Grade 1 O.O )
4 Answers
- FredLv 61 decade agoFavorite Answer
Pseudocode is simply a way of writing down the process steps of a computer program without worrying about syntax and formatting. It is meant to function as an understandable way of working out an algorithm from which true code can be written. For example, this is simple pseudocode:
START
ACCEPT TWO NUMBER FROM THE USER
ADD THE TWO NUMBERS TOGETHER
DISPLAY THE RESULT
END
Using this concept, you can easily change this to reflect the problems give. I'll help you get started. For number 1:
START
ACCEPT AN AMOUNT_ENTERED FROM USER
IF AMOUNT_ENTERED > 500 THEN DISCOUNT_RATE = .10
IF AMOUNT_ENTERED > 1000 THEN DISCOUNT_RATE = .20
SET DEDUCTION = AMOUNT_ENTERED x DISCOUNT_RATE
SET DISCOUNTED_AMOUNT = AMOUNT_ENTERED - DEDUCTION
DISPLAY "This is the discount amount: " DEDUCTION, " and this is the final rate: " DISCOUNTED_AMOUNT
END
- samasLv 45 years ago
No trouble. Statement three approach use English (or your language of option) to provide an explanation for your programming constructs. The thought is that you do not wish to get wrapped up within the semantics of the precise language however as an alternative cognizance at the common sense you're seeking to enforce. I've created an excessively contrived illustration at the hyperlink beneath.
- 1 decade ago
your school is a complete failure if they did not teach you how to use google. that is my answer: google pseudocode