Question: please i need help please!! ------------------------------------------------------------------- 1. What is an algorithm? 2. What is pseudocode? 3. What is a variable? 4. Write two different assignment
please i need help please!!
-------------------------------------------------------------------
1. What is an algorithm?
2. What is pseudocode?
3. What is a variable?
4. Write two different assignment statements in pseudocode that sets the value of the variable total to 25?
5. What is a repetition construct?
6. What is a selection construct?
7. Write a defining diagram, algorithm, and flowchart of a problem that reads a number from the user, doubles it, and outputs the result.
8. Write pseudocode that reads a number from the user and prints "High" if the number is greater than 100 and "Low" otherwise.
9. Use repetition to write pseudocode that prints the numbers from 1 to 3000
(a) use a pre-test loop
(b) use a post-test loop
10. Compare and contrast the repetition and the selection algorithm constructs.
11. Jackson Hammer is a carpenter who wants an application to compute the price of any desk a customer orders, based on the following: desk length and width in inches, types of wood, and number of drawers. The price is computed as follows:
The charge for all desks is a minimum of $200.00
If the surface (length * width) is over 750, add $50.00
If the wood is mahogany, add 150.00; for oak add $125. No charge is added for pine.
For every drawer in the desk, there is an additional $30.00 charge.
Write an algorithm and flowchart that will solve this problem.
12. A program is required to read a customers name, a purchase amount and a tax code. The tax code has been validated and will be one of the following:
0 tax exempt (0%)
1 state tax only (3%)
2 federal and state sales tax (5%)
3 special sales tax (7%)
The program must then compute the sales tax and the total amount due, and print the customers name, purchase amount, sales tax and total amount due. Create the defining diagram, algorithm and flowchart.
13. Design an algorithm that will display to the screen the first 20 numbers with their squares and cubes as follows:
1 1 1
2 4 8
3 9 27
14. In the following pseudocode, what is printed? Show the results through each step step.
d = 4 e = 6 f = 7
while (d < f)
d = d + 1
e = e -1
endwhile
print d,e, f
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
