Appendix A Answers to the Chapter Quizzes
This appendix contains the answers to all the quiz questions from each chapter. I hope you got all the answers correct! If you miss more than four answers in any given quiz, I recommend that you go back and re-read the chapter in question and try again before proceeding, because each chapter builds upon the ones before it. Good Luck!
1. |
What company developed DarkBASIC?
|
|
2. |
DarkBASIC takes advantage of what Windows-based technology?
|
|
3. |
Which of the following commands is not listed on the File menu?
|
|
4. |
DarkEDIT is an alternative for the DarkBASIC editor.
|
|
5. |
DarkBASIC was based on which of the following programming languages?
|
|
6. |
Which of the following is not a menu in DarkBASIC?
|
|
7. |
What is the main Web site for DarkBASIC?
|
|
8. |
BASIC stands for:
|
|
9. |
What is the name of the DarkBASIC add-on product?
|
|
10. |
Is there a run-time file required for DarkBASIC?
|
|
Answers
1. |
B |
2. |
C |
3. |
D |
4. |
A |
5. |
A |
6. |
D |
7. |
A |
8. |
C |
9. |
D |
10. |
B |
1. |
Programming is the art of solving what?
|
|
2. |
Which is not part of the method for solving problems?
|
|
3. |
Which command is used to make a comment?
|
|
4. |
What command is used to start a series of comments?
|
|
5. |
The END command will restart the program.
|
|
6. |
What is a good tool for debugging your program?
|
|
7. |
Why is it important to comment?
|
|
8. |
What is an algorithm?
|
|
9. |
What command do you use to end a program?
|
|
10. |
What does REMEND do?
|
|
Answers
1. |
B |
2. |
D |
3. |
B |
4. |
B |
5. |
B |
6. |
A |
7. |
A |
8. |
B |
9. |
B |
10. |
A |
1. |
What is an argument in DarkBASIC?
|
|
2. |
What is an array in DarkBASIC?
|
|
3. |
What command defines a global variable?
|
|
4. |
Which is evaluated first in the order of operations?
|
|
5. |
What does the PRINT command do?
|
|
6. |
In EXECUTE FILE "jumpers.exe", "" is a valid command.
|
|
7. |
In DarkBASIC what does 2+2*2+6*(3+2) evaluate to?
|
|
8. |
Which is not a valid variable type?
|
|
9. |
Which command converts a string into an integer?
|
|
10. |
Which command prints the current date on the computer?
|
|
Answers
1. |
C |
2. |
B |
3. |
C |
4. |
A |
5. |
A |
6. |
A |
7. |
C |
8. |
D |
9. |
B |
10. |
B |
1. |
Which symbol do you use to add two strings?
|
|
2. |
Which command will convert a string to an integer?
|
|
3. |
Which command centers text in a given location?
|
|
4. |
What does the SET TEXT TRANSPARENT command do?
|
|
5. |
What is the result of the following command: LEN("This is a string")?
|
|
6. |
What would the following source code print on the screen? MyString$ = "This is my string!" PRINT RIGHT$(MyString$,7)
|
|
7. |
What would the following source code print on the screen? MyString$ = "This is my string!" PRINT LEFT$(MyString$,6)
|
|
8. |
Which symbol attached to a variable denotes it as a string?
|
|
9. |
Which value would TEXT STYLE] return if you were in bold mode?
|
|
10. |
Which command returns the font of the text being displayed?
|
|
Answers
1. |
B |
2. |
B |
3. |
A |
4. |
A |
5. |
C |
6. |
D |
7. |
A |
8. |
A |
9. |
B |
10. |
C |
1. |
How many times will the following loop iterate? FOR X = 1 to 10 NEXT X
|
|
2. |
Which command will exit out of a loop?
|
|
3. |
Which word describes what happens in a FOR…NEXT loop?
|
|
4. |
Which of the following conditional statements means greater than?
|
|
5. |
How would you make a FOR…NEXT loop count by 3s?
|
|
6. |
Which command completes a REPEAT loop?
|
|
7. |
According to this chapter, what is a loop?
|
|
8. |
What is another term for a combined loop (one loop inside another)?
|
|
9. |
Which command completes a DO loop?
|
|
10. |
Which command completes a WHILE loop?
|
|
Answers
1. |
C |
2. |
B |
3. |
D |
4. |
B |
5. |
A |
6. |
D |
7. |
B |
8. |
B |
9. |
C |
10. |
A |
1. |
Which command does DarkBASIC use for single-line conditional statements?
|
|
2. |
What is the purpose of a conditional statement?
|
|
3. |
What is the purpose of a subroutine?
|
|
4. |
How many programmers does it take to screw in a light bulb?
|
|
5. |
Which character suffix do you use to declare a string variable?
|
|
6. |
Which statement do you use to declare a custom subroutine in DarkBASIC?
|
|
7. |
All functions must return a value, even if that value is null.
|
|
8. |
Which statement is used to mark the end of a function?
|
|
9. |
What is the common synonym for a conditional statement?
|
|
10. |
Which at phrase best describes the activities of the sample Conditions program?
|
|
Answers
1. |
A |
2. |
C |
3. |
B |
4. |
D |
5. |
B |
6. |
D |
7. |
B |
8. |
B |
9. |
C |
10. |
B |
1. |
Which command or statement is used to declare a data sequence?
|
|
2. |
How does the READ command read a data sequence?
|
|
3. |
Which command can be used to move the pointer in a data sequence back to the beginning?
|
|
4. |
What is a list of related data stored in sequential order within the source code called?
|
|
5. |
If an array is created with DIM A(10), how many elements are usable in the array?
|
|
6. |
What types of data can you store inside a data sequence or an array?
|
|
7. |
Arrays can't store strings, just integers or decimals.
|
|
8. |
What is the largest number of elements that you can allocate in an array?
|
|
9. |
Which command did the BouncingBalls program use to draw each ball?
|
|
10. |
What does the RESTORE monsters command accomplish in the MonsterList program?
|
|
Answers
1. |
D |
2. |
A |
3. |
D |
4. |
B |
5. |
A |
6. |
B |
7. |
B |
8. |
D |
9. |
C |
10. |
C |
1. |
Which is the standard multiplication character for programming languages?
|
|
2. |
Which math operation does the / character perform?
|
|
3. |
What is the relational operator <= called?
|
|
4. |
What does the not equal to relational operator look like?
|
|
5. |
Which command calculates the absolute value of a number?
|
|
6. |
Which calculation does the SQRT command perform?
|
|
7. |
What is the base minimum number returned by the RND command?
|
|
8. |
Which date format does the GET DATE$ command return by default?
|
|
9. |
Which command returns a 24-hour time by default as a string variable?
|
|
10. |
Which advanced trigonometry command returns the cosine of an angle?
|
|
Answers
1. |
C |
2. |
B |
3. |
C |
4. |
C |
5. |
C |
6. |
C |
7. |
A |
8. |
A |
9. |
B |
10. |
C |
1. |
Which command retrieves the list of installed video cards (if there's more than one)?
|
|
2. |
Which command detects whether a 3D graphics accelerator is present in the system?
|
|
3. |
Which command checks for support of transform and lighting (T&L)?
|
|
4. |
Which command reports the amount of free video memory available?
|
|
5. |
Which command retrieves the list of display modes supported by the video card?
|
|
6. |
DarkBASIC supports both 2D and 3D hardware graphics acceleration.
|
|
7. |
Which command will draw a single pixel on the screen?
|
|
8. |
Which command will draw a circle on the screen?
|
|
9. |
Which command will draw a filled rectangle on the screen?
|
|
10. |
Which command changes the foreground and background colors?
|
|
Answers
1. |
B |
2. |
A |
3. |
B |
4. |
A |
5. |
B |
6. |
A |
7. |
C |
8. |
D |
9. |
C |
10. |
B |
1. |
How many colors are in an 8-bit bitmap?
|
|
2. |
What does the following code do? LOAD BITMAP "images est1.bmp", 1
|
|
3. |
How many bitmaps does DarkBASIC support at one time?
|
|
4. |
Which bitmap represents the screen?
|
|
5. |
Which command copies the contents of bitmap 1 into bitmap 0?
|
|
6. |
Which command deletes bitmap 1?
|
|
7. |
To what does the following code set the current bitmap? bitmapnum = (10/2)+10 SET CURRENT BITMAP bitmapnum
|
|
8. |
Which command flips bitmap 1 horizontally?
|
|
9. |
Which command creates a bitmap that is 100150 pixels?
|
|
10. |
SAVE BITMAP will save any bitmap to the hard drive.
|
|
Answers
1. |
B |
2. |
B |
3. |
C |
4. |
D |
5. |
D |
6. |
C |
7. |
C |
8. |
B |
9. |
D |
10. |
A |
1. |
What is a sprite?
|
|
2. |
Which term best describes the process of drawing only solid pixels in a sprite?
|
|
3. |
Which year was Pac-Man released?
|
|
4. |
Which classic arcade game featured alien ships with a tractor beam that could capture your ship?
|
|
5. |
What was Pac-Man's original name?
|
|
6. |
Which command performs bounding box collision detection on two sprites?
|
|
7. |
Which command performs impact collision detection on two sprites?
|
|
8. |
Which command do you use to draw a sprite on the screen (or to the active bitmap)?
|
|
9. |
Which command grabs a portion of an image from a previously loaded bitmap?
|
|
10. |
What are the three commands that you can use to create a game loop?
|
|
Answers
1. |
A |
2. |
C |
3. |
A |
4. |
D |
5. |
B |
6. |
B |
7. |
C |
8. |
C |
9. |
A |
10. |
D |
1. |
Which command is used to read a string or number entered from the keyboard?
|
|
2. |
What does the INKEY$() command do?
|
|
3. |
Which command returns 1 when the spacebar is pressed?
|
|
4. |
What is the value of mouseclick() when the left and right mouse buttons are both pressed?
|
|
5. |
When a mouse is located at x = 100, y = 300, which command returns 100?
|
|
6. |
How many joystick hats does DarkBASIC support?
|
|
7. |
Which checklist value returned from PERFORM CHECKLIST FOR CONTROL DEVICES returns whether the device supports force feedback?
|
|
8. |
Which command cancels all force-feedback effects on a joystick?
|
|
9. |
Which command returns the scan code of the key currently being pressed?
|
|
10. |
ESCAPEKEY() = 1 means the Esc key is being held down.
|
|
Answers
1. |
A |
2. |
A |
3. |
A |
4. |
C |
5. |
C |
6. |
B |
7. |
B |
8. |
C |
9. |
A |
10. |
A |
1. |
Which function loads a sound?
|
|
2. |
Which function removes a sound from memory?
|
|
3. |
Which is the correct way to load a 3D sound?
|
|
4. |
What does the SOUND PLAYING function do?
|
|
5. |
LOOP SOUND only plays a sound once.
|
|
6. |
What is the correct way to stop a sound?
|
|
7. |
In the command POSITION SOUND 6, 100, 150, 300, what is the X position of the sound?
|
|
8. |
What is the proper way to get the X position of a sound that has been positioned by POSITION SOUND 6, 100, 150, 300?
|
|
9. |
What is the proper way to set the speed of sound 8 to 600?
|
|
10. |
Why would you use the RESUME SOUND command?
|
|
Answers
1. |
A |
2. |
C |
3. |
D |
4. |
B |
5. |
B |
6. |
C |
7. |
B |
8. |
A |
9. |
B |
10. |
C |
1. |
Which command loads a MIDI file?
|
|
2. |
Which command stops music from playing?
|
|
3. |
How many CD tracks can play at one time?
|
|
4. |
What does the MUSIC PAUSE command do?
|
|
5. |
How many MIDI files can you store at one time?
|
|
6. |
RESUME MUSIC will continue a song where it was paused.
|
|
7. |
Which of the following commands will not make music play through the speakers?
|
|
8. |
What must you do before you can play a new CD track?
|
|
9. |
Which command will tell you whether a song is looping?
|
|
10. |
What does the DELETE MUSIC command do?
|
|
Answers
1. |
A |
2. |
B |
3. |
D |
4. |
A |
5. |
B |
6. |
A |
7. |
D |
8. |
A |
9. |
B |
10. |
A |
1. |
What information does the GET DIR$ command not contain?
|
|
2. |
The CD command in DarkBASIC stands for:
|
|
3. |
How many bits are in a byte?
|
|
4. |
What information does FILE SIZE return?
|
|
5. |
Where does the data from the WRITE TO CLIPBOARD command go?
|
|
6. |
Which command opens HelloWorld.txt for reading as file #1?
|
|
7. |
Which command reads the number 1,000,000 in integer from file #1?
|
|
8. |
Which command writes the string "Hello World" to file #1?
|
|
9. |
Which command changes the file name "HelloWorld.txt" to "GoodBye.txt?"
|
|
10. |
A bit can be 0, 1, or 2.
|
|
Answers
1. |
C |
2. |
D |
3. |
C |
4. |
A |
5. |
D |
6. |
C |
7. |
B |
8. |
C |
9. |
C |
10. |
B |
1. |
What does codec stand for?
|
|
2. |
Which movie file format does DarkBASIC support?
|
|
3. |
What are arguably the two most significant video codecs for the AVI format?
|
|
4. |
Which command plays a previously loaded movie file repeatedly?
|
|
5. |
Which movie file format has an .mov extension?
|
|
6. |
What is the maximum number of movies that can be played on the screen at once in a DarkBASIC program?
|
|
7. |
Which command changes the scale or size of a movie during playback?
|
|
8. |
Which command retrieves the current horizontal position of a movie?
|
|
9. |
Which command moves a movie to another position on the screen?
|
|
10. |
In what year was the game Wing Commander II: Vengeance of the Kilrathi released?
|
|
Answers
1. |
B |
2. |
D |
3. |
B |
4. |
A |
5. |
C |
6. |
D |
7. |
C |
8. |
B |
9. |
B |
10. |
B |
1. |
How many vertices (or angles) are required to make up a triangle?
|
|
2. |
Which coordinate system is used to calculate the position of points in a 3D program?
|
|
3. |
What is the name of the process that smoothes jagged edges in a 3D scene?
|
|
4. |
Which command creates a 360-degree quadrilateral?
|
|
5. |
Which command sets the level of ambient light in the 3D scene to a uniform amount?
|
|
6. |
Which type of light source produces a colored light region in the shape of a sphere?
|
|
7. |
Which type of light source lets you set an inner and outer angle of effect?
|
|
8. |
How many sides do you need to make a cube?
|
|
9. |
Which command creates an overlay window on the screen for a camera?
|
|
10. |
Which version of DirectX does DarkBASIC Professional directly support?
|
|
Answers
1. |
B |
2. |
B |
3. |
D |
4. |
A |
5. |
C |
6. |
B |
7. |
D |
8. |
C |
9. |
C |
10. |
C |
1. |
Which component of DirectX does DarkBASIC utilize for multiplayer support?
|
|
2. |
A packet is…
|
|
3. |
Which of the following is not a domain name?
|
|
4. |
What is considered the taxicab of the Internet?
|
|
5. |
How many players can participate in a single net game?
|
|
6. |
Which command returns the number of net messages waiting?
|
|
7. |
What does the Create Memblock command do?
|
|
8. |
How is the size of a memblock measured?
|
|
9. |
What does the WRITE MEMBLOCK WORD 1, 200, 4 command do?
|
|
10. |
GET MEMBLOCK SIZE(Memblock Number) returns what information about a memblock?
|
|
Answers
1. |
C |
2. |
B |
3. |
C |
4. |
A |
5. |
B |
6. |
D |
7. |
A |
8. |
D |
9. |
B |
10. |
D |