bbb8.jpg

Back 

Understanding and using selection questions

Q1. How many basic ways are there to construct a selection construct?
Q2. Write some pseudo-code that does the following. A single digit random number is assigned to a variable called Random. You have to enter a single digit and store it in a variable called Number. Then you have to test it. If it is the same as the random one, you display “Well done!” and if it isn't you display “Sorry, not this time”.
Q3. What is meant by a 'nested IF statement'?
Q4. Why is CASE usually preferred to lots of IF statements?
Q5. Apart from selection, what are the other two programming constructions?
Q6. What are the common symbols used in programming for 'not equal to'?
Q7. What advice can you give someone to help them remember whether 'less than' is this symbol < or this symbol > ?
Q8. Do some research. What is meant by the 'order of precedence'?
Q9. Do brackets have a higher or lower precedence than multiplication?
Q10. does AND have a higher or lower precedence than OR?

Back