Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Write the required pseudocode for a program, which prints instructions for wh

ID: 3902528 • Letter: 1

Question

1. Write the required pseudocode for a program, which prints instructions for what you should do today? [3 Marks] Problem: If today is a weekday and it’s not a holiday, then you go to work. However, if it’s a weekday and a holiday, then what you do depends on the weather: If it’s raining, you play video games. If it’s not raining, you go for a picnic. If today is not a weekday, then you go to the museum if it’s raining. After the museum, you play video games. If it’s not a weekday and not raining, you go for a picnic. Note: When you go to work the weather doesn’t matter. On the weekend (not a weekday) it doesn’t matter if it’s a holiday. Instructions: 1. Your pseudocode must implement the logic. The program should start by asking three yes/no questions and inputting responses from the user. It should then print out the instructions. 2. Sample: Here is a sample of how a real program written from the pseudocode might run. Of course, you can’t run pseudocode (imagine how your pseudocode would run). Is it a weekday today, yes or no? no Is it a holiday? No Is it raining? yes Go to the museum, then play video games. 3. Write your pseudocode program as a Word Document File (.docx) or any text file (.txt) using Notepad or WordPad or any other text editor, then upload the file in Assignment Section on SLATE. Do not send your program by email. The pseudocode you hand in should not be Java or any real programming language! Hint: After you write your pseudocode you could convert it to Java to try it out, but this is not required. Do not hand in your Java program or any other programming language program, if you do I will deduct marks. 2. Trace through the following pseudocode program by imagining how it would run. Put a star (*) to the left of each statement that runs. Write the output produced by the program in your file (Use same document file as for Question 1) marked as “Answer #2”. [2 marks] LET num = 65 IF num < 80 OR num >= 90 THEN PRINT "Not A" IF num >= 50 AND num < 60 THEN PRINT "Grade D" ELSE PRINT "Neither" END IF ELSE PRINT "Grade A" END IF Output: Write the output produced by the program in your file (Use same document file as for Question 1) marked as “Answer #2”.

Explanation / Answer

Question 1

If it is a Weekday then

If it is not a Holiday then

Go to Work.

else

If it is raining then

Play video games

else

Go for a picnic

else

If it is raining then

Go to the museum and also play video games after that

else

Go fo a picnic

Question 2

LET num = 65

*IF num < 80 OR num >= 90

*THEN PRINT "Not A"

IF num >= 50 AND num < 60

THEN PRINT "Grade D"

ELSE

PRINT "Neither"

END IF

ELSE

PRINT "Grade A"

END IF

Ouput

Not A