Uploaded by EMUNRICH CLEOTE

Pseudocode Assignment

advertisement
Elective: Pseudocode
Easy
Mark
Name:
Write the Pseudocode for the following problems
1. Write a program that will take as input the length and width of a rectangular garden and will calculate and
output the surface area.
2. Write a program that will take as input a temperature in degrees Fahrenheit and will convert and output
the temperature in degrees Celsius. (Hint: DegreesC = (DegreesF – 32) * 5/9)
3. Write a program that will take as input the air temperature in degrees Celsius and will output a message
to say whether it is freezing (below 1 degree) or not.
4. Amend your program from Question 3 to say whether the water in a container is frozen, liquid or boiling.
5. Write a program that will take as input a positive integer and will output integers counting from 1 to the
number input. For example, an input of 5 will output: 1 2 3 4 5.
6. Calculate sales taxes. The sale amount and tax rate should be inputs.
7. Solve Quadratic Equation:
8. Write the code to add n numbers
9. Write the pseudocode to create a method to return the first character of a string. Use that method to
print all cities starting with the letter ‘D’ in a array and the number of ‘D’ cities
CITIES = ["Athens","Berlin","Dallas","Denver","London","New York","Rome","Donville"]
Download