Write a pseudocode to recreate the figure given in the expected canvas for scenario
Answers
Explanation:
I have just started a basic class in programming and I am totally lost. Can someone help me out? I have to write pseudocodes and create flowcharts and don't have a clue. I need help.
Create flowcharts and pseudo-code for the following problems:
1. You're trying to figure out where to go on vacation. Here are the different scenarios: First, check how many vacation days you have left. If you have less than 2 days, you will stay at home. If you have between 2 and 4 days, you will go to Asheville. If you have more than 4 days, you check your budget. If your budget is greater than $1200, you will go to Aruba. Otherwise, if it's greater than $800, you will go to Miami. If it's not greater than $800, you will go to Orlando.
2. You need to calculate the discount that your customers receive based on the value of their order. If the total amount ordered is less than $20, no discount will be given. If the total amount is between $20 and $50, a discount of 5% will be given. If the total amount is greater than $50 and less than $100, a discount of 10% will be given. If the total amount is $100 or more, a premium customer receives 20% discount and a regular customer receives 15% discount.
to recreate the figure given in the expected canvas for scenario:
Explanation:
- Arrange the tasks in the correct order and write the pseudo-c to match.
- Begin with a it as statement that states the main purpose or objective.
- Example:
The user will be able to check the status of their computer with thi programme if the number is even or odd
- Indent the statements in the same way that the if-else, for, and while loops are indented in a programme, as this helps to understand the decision control and execution process.
- They also make the text a lot easier to read.
- Example:
If "1" is true
response in print
"I am Case 1," says the narrator.
if "2" is true
response in print
"I am Case 2," says the narrator.
- Make use of proper naming conventions. Humans have a natural desire to follow what they observe.
- When a programmer examines pseudo-c, he will take the same technique as when he examines real one.
- As a result, the name must be straightforward and distinct.
- Use CamelCase for methods, upper case for constants, and lower case for variables when writing sentences.
- Describe everything that will happen in the real one. Make sure the pseudo isn't too abstract.
- Use typical programming constructs like 'if-then,' 'for,' 'while,' and 'cases' in the same way that we do in programming.
- Examine whether all sections of a pseudos are complete, finite, and easy to interpret.
- Write the pseudo in a non-programmatic manner. It's important to keep it easy enough to grasp even for a layperson or client, therefore don't use too many technical terms.