Can I keep a running total?
Can I use a list box to improve my user interface?
Most programs are developed using programming languages. These languages have specific syntax that must be used so that the program will run properly. Pseudocode is not a programming language, it is a simple way of describing a set of instructions that does not have to use specific syntax. Pseudocode can be used to plan out programs. First of all write out what you want to do. Look at the Task below and write out step by step what will happen
A video which shows you how to write pseudocode and break down problems, will be posted here very soon. In the meantime, use these links to help you:
https://www.bbc.co.uk/bitesize/guides/z22wwmn/revision/4
https://www.wikihow.com/Write-Pseudocode
Remember Exercise 3, when you added two numbers together? This is what the pseudocode should look like for the ADD process:
Procedure AddTwoNumbers
Begin
Input First Number
Input Second Number
Total = First Number + Second Number
Output Total
End
Notice the procedure is giving a meaningful name. A BEGIN and END surrounds the code.
When we write pseudocode, we always think about:
INPUT
PROCESS
OUTPUT
In this algorithm, we need to:
INPUT the two numbers
Add the two numbers together (PROCESS)
OUTPUT the answer
HINTS:
What are you storing? These need to be your variables
Keep a running total of the NUMBER of exam marks entered
Keep a running total of the TOTAL VALUE of the exam marks
Once you have the Total Value, you will need to find the average and then Output it.
Watch this video to help you use a listbox, before you start the task.
Watch this video to help you understand what you have to do behind the OK button and the Calculate Average button.
Modify the exit button so that you check whether the user really wants to exit before quitting the program.
Clear text boxes and any totals so that user can reuse the program without exiting and starting again.
Make sure the cursor is in the correct position for the user to enter mark
Write a program to work out how many days you have lived for.
Agorithm
Enter date of birth
Get today’s date
Get the difference in days between the two dates
Display result
Extension
Work out how many seconds you’ve lived for.
Hints
Use Date.Now to get today’s date
Use the date type for a variable to store your date of birth
Use the datediff function to get the difference between two days
Help