1.
If the following code was given, what would probably be the output screen? PRINT ((7+6-3*4)+2^3/2)+((7+6-3*4)+2^3/2)+((7+6-3*4)+2^3/2)+((7+6-3*4)+2*3/2)+((7+6*3-4)-2^0/1)
Correct Answer
A. 15
Explanation
The code evaluates an arithmetic expression and prints the result. The expression consists of multiple additions, subtractions, multiplications, divisions, and exponentiations. The order of operations is followed, so the exponentiation is performed first, followed by multiplication and division, and finally addition and subtraction. The expression is evaluated from left to right, so the first part of the expression is (7+6-3*4)+2^3/2, which equals 15. The second part of the expression is the same as the first part, so it also equals 15. Therefore, the output screen would probably display "15".
2.
What does MOD mean?
Correct Answer
B. Modular Division
Explanation
Modular Division, also known as Modulus Division, is a mathematical operation that calculates the remainder when one number is divided by another. It is denoted by the symbol "%". This operation is commonly used in computer programming and is particularly useful when dealing with cyclic or periodic patterns. Therefore, the correct answer for the given question is "Modular Division".
3.
What will the following code produce? PRINT "Hi"
Correct Answer
B. A screen showing "Hi"
Explanation
The given code will produce a screen showing "Hi". The PRINT statement is commonly used in programming languages to display output on the screen. In this case, the code is instructing the computer to print the text "Hi". Therefore, when the code is executed, the output will be displayed on the screen rather than being printed on a physical paper.
4.
What will this code produce? firstword$ = "book" secondword$ = "keeper" PRINT firstword$ + secondword$
Correct Answer
A. An output screen with:
"bookkeeper"
Explanation
The given code will produce an output screen with the text "bookkeeper". This is because the code concatenates the values of the variables "firstword$" and "secondword$" using the "+" operator and then prints the result. The values of the variables are "book" and "keeper" respectively, so when they are concatenated, the result is "bookkeeper".
5.
What is the purpose of Qbasic?
Correct Answer
A. As a replacement of GW-BASIC
Explanation
QBasic was developed as a replacement for GW-BASIC, which was a programming language used in the 1980s. QBasic aimed to address the shortcomings of GW-BASIC by providing better graphics, a more user-friendly graphical user interface, and faster program execution. Therefore, the purpose of QBasic was to offer an improved and updated version of GW-BASIC to meet the evolving needs of software development in the 1980s.
6.
What does OS mean?
Correct Answer
B. Operating System
Explanation
An operating system (OS) is a software that manages computer hardware and software resources and provides common services for computer programs. It acts as an intermediary between the user and the computer hardware, allowing users to interact with the computer and run applications. Therefore, "Operating System" is the correct answer as it accurately defines the term "OS".
7.
If the English language follows formats and rules on grammar, what does QBasic follow as counterpart?
Correct Answer
B. Syntax
Explanation
QBasic follows syntax as its counterpart. Syntax refers to the set of rules and structures that dictate how a programming language should be written. Just like how English language has formats and rules on grammar, QBasic has its own set of syntax rules that define how the code should be written in order for it to be valid and executable. These syntax rules include guidelines on punctuation, keywords, variable declarations, and overall structure of the program.
8.
What must you do if "Syntax Error" appears?
Correct Answer
A. Check for flaws, edit, and rerun. It may be a programmer's error.
Explanation
If "Syntax Error" appears, the correct course of action is to check for flaws, edit the code to correct any errors, and then rerun the program. This error typically occurs when there is a mistake in the programming code, such as a misspelled keyword or a missing punctuation mark. By reviewing the code and making necessary edits, the programmer can fix the error and rerun the program to ensure it runs correctly. Deleting the code or assuming it is a virus is not the appropriate response in this situation.
9.
If a program does not stop from looping, what will you probably do?
Correct Answer
B. Press CTRL+C, because "C" means "Close"
Explanation
Pressing CTRL+C is the correct answer because it is a commonly used keyboard shortcut in many programming environments to interrupt or terminate a running program. In this context, "C" does not necessarily mean "Close" but rather represents the keyboard key "C" which is used to send an interrupt signal to the program, causing it to stop execution. This is a standard way to stop a program from looping indefinitely and regain control of the system.
10.
Press "A" to proceed, "B" to exit. Answer: = The program asks for an answer. Suppose the user entered a. What do you think would happen?
Correct Answer
B. The program will neither proceed nor exit. There are no choices that match "a". Capitalization is important nowadays. It is a primary instruction for us to capitalize what should be capitalized.
11.
If your grandmother is still living, how would you explain how to use QBasic to her?
12.
If you could add any feature to Microsoft Word, what would it be?
13.
Which QBasic command is used to clear the screen?
Correct Answer
A. CLS
Explanation
In QBasic, the CLS (Clear Screen) command is used to clear all text and graphics from the screen, providing a blank workspace for new output. This command is commonly used at the beginning of programs to ensure the screen is clear before displaying new information.
14.
What do you think ARE the significances of knowing how to program? Do you think it can add color and effect to you as a person? If so, by how? Will it be capable of changing your life? How can you apply programming in your life?
15.
What was the hardest question asked of you so far today?