0% found this document useful (0 votes)
32 views2 pages

01 Pseudocode Problems Week 1

Uploaded by

melciu.robert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views2 pages

01 Pseudocode Problems Week 1

Uploaded by

melciu.robert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Noel Carey APS Pseudocode Problems Week 1

Pseudocode Problems Week 1


Instructions
• This week there are 6 problems for you to solve and write Pseudocode for.
• All 6 solutions should be on a single Notepad document and saved using your student
number and name (e.g. NoelCarey_B000123456.txt)
• When writing your solutions, keep in mind the 5 standard guide points.
1. Program explanation at the start.
2. One statement per line.
3. Use of white space and indentation.
4. Capitalisng of Key Words and good structure
5. Correct logic and flow.
• Upload your single text file to the appropriate Moodle section.
• REMEMBER: your task here is to write Pseudocode and get the logic and structure of
the program correct. You don't need to know all the nuts and bolts of a programming
language.

Don’t forget your program Structure Guide:


//Declare variables
//Get input from user
//Processing
//Output or Results

Question 1
Write a Pseudocode program that produces the output shown in Figure 1 below.
Java Programming

Rocks
Figure 1

Question 2
Write a Pseudocode program that prints the answers to the following arithmetic expressions on
separate lines. (Hint: Use PRINT NEW LINE)

NOTE: your program should print the linear expression and the result.
1. 4 × 4 =

2. 3 × 7 + (−2 × −8) =

(2 × 5)−6
3. (4 × 8)−(2 ×3)
=

Page 1 of 2
Noel Carey APS Pseudocode Problems Week 1

Question 3
Write a Pseudocode program that uses two variables number1 and number2 to store the values 71
and 3.14. Your program should print the values stored in number1 and number2 to the screen on
separate lines as shown below in Figure 2.
number1 = 71
number2 = 3.14
Figure 2

Question 4
An employee receives an hourly rate of €9.80 and works 42 hours a week. Write a
Pseudocode program that calculates the employees gross weekly wage and prints it to screen.
NOTE: be very careful when choosing variable types and their names. The output should look like
that shown in Figure 3.
Hourly rate is 9.8
Hours worked is 42
Gross weekly is 411.6
Figure 3

Question 5
Given the following function 𝑓(𝑥) = 𝑥 2 + 3𝑥 − 5, write a Pseudocode program to evaluate
𝒇(𝒙),𝒘𝒉𝒆𝒓𝒆 𝒙 = 𝟒 and 𝒇(𝒙),𝒘𝒉𝒆𝒓𝒆 𝒙 = 𝟔. Your program should print the resulting arithmetic
expressions and the final results. NOTE 𝑥 2 can be written as (𝑥 ∗ 𝑥)

Page 2 of 2

You might also like