![]() |
![]() |
![]() |
| QUIZ 3
AIM - To Show understanding of variable declarations Code, and Message boxes |
|
|
|
The answers to your questions will form the last file name in the URL. You need to click onto the radio buttons. If you have difficulty with any of the answers don't be disheartened, go back a few steps and re-read the last lesson. Only when you understand the vocabulary of programming will you have a solid foundation to build on. You have ONE try for each question. Question 1 What is the opening line of code to 'get some space' when declaring a variable? Dim String Dimension
Var Dec Question 2 What type of varaible would you use to hold a name? ByteInteger Name String
Boolean Question 3 The correct declaration for a vaiable that is going to hold the amount of melons in a small crate is Dim melonCount as Byte Dimension melon as integer Dim melonCount as String Var dec melon as long
Dimension as MelonCount Question 4 The code to end a program is? Sub End End Main End() End Sub Main End Question 5 Which line of code will correctly create a message box that has
and stores the users choice of button in a suitably named variable? x = MsgBox("Would you like to play a game?", vbYesNo+64 ) userChoice = MsgBox("Would you like to play a game?", vbYesNoCancel+48 ) Choice = MsgBox("Would you like to play a game?") MsgBox("Would you like to play a game?", vbYesNo+48 )
userChoice = MsgBox("Would you like to play a game?", vbYesNo+48 ) Good Work - Can YOU Solve This? OK if you have 5 correct answers you have learnt well and are ready for the next level. Before you click the button below write down the code to start a program, create a message box with two buttons Yes and No that says " I'm a message box are you" and end the program. The next page will give you the answer - do it yourself, NOW you'll learn more by trying before you see the answer!!
Getting to the Next Lesson When you have 5 correct answers click the button. If you don't have the correct answers you will be taken back to the previous lesson. HINT
|
||