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
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 its not a holiday, then you go to work. However, if its a weekday and a holiday, then what you do depends on the weather: If its raining, you play video games. If its not raining, you go for a picnic. If today is not a weekday, then you go to the museum if its raining. After the museum, you play video games. If its not a weekday and not raining, you go for a picnic. Note: When you go to work the weather doesnt matter. On the weekend (not a weekday) it doesnt matter if its 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 cant 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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
