2.)Which character is used to denote a comment?
| A.) |
# |
|
| B.) |
\ |
|
| C.) |
% |
|
| D.) |
' |
3.)Which of these tasks is impacted by both Option Strict and Option Explicit?
A.) Declaring a variable
B.) Masking
C.) Interpreting an event
D.) Casting a variable at some point after it has been declared
4.) What happens when you type a line such as this:
variable *=5
| A.) |
Multiply the current value of the variable by 5 and store it as variable |
|
| B.) |
Check if the variable equals 5 |
|
| C.) |
Set the variable to a random value not equal to 5 |
|
|
D.) None of these |
5.) Which of these best defines a logical error?
| A.) |
Any error that stops the execution of a code |
|
| B.) |
Any error that is the result of a typo in the code itself |
|
| C.) |
Any error that occurs from faulty translation of a procedure into code |
|
| D.) |
Any error that is the result of an external entity (user, file, or otherwise) |
6.) Which type of pre-programming technique leads to the divide and conquer method?
| A.) |
Problem Solving |
|
| B.) |
Hierarchy Chart |
|
| C.) |
Pseudocode |
|
| D.) |
Flowchart |
8.) What is the difference between a control and an event?
| A.) |
Controls are made by a developer; events are executed by a user |
|
| B.) |
Events are user activities that interact with controls |
|
| C.) |
Both events and controls must be coded by developers |
|
| D.) |
All of the above |
9.) What is tab order?
| A.) |
The order in which a user would progress from control to control if they pressed tab |
|
| B.) |
The order in which users encounter various forms in a project |
|
| C.) |
The order in which the developer creates the objects, without any chance to change it |
|
| D.) |
The order of tools on the Visual Studio ribbon |
10.) Which of the following division activities is paired with a proper response?
| A.) |
9 Mod 3 = 3 |
|
| B.) |
9 / 3 = 3 |
|
| C.) |
9 \ 3 = 0 |
|
| D.) |
All are paired correctly |
|
| E.) |
None are paired correctly |
11.) Which of these represents a syntax error?
| A.) |
Dim g as Integer as Double |
|||||||||||||
| B.) |
Opening a connection to a file that does not yet exist |
|||||||||||||
| C.) |
Trying to call in a file that does not exist D.)quotient = 10/3 |
|||||||||||||
|
12.) Which is these is an example of a runtime error?
|
2) A
In python we will use # to write comments
3) D
Casting a variable at some point after it has been declared
That means converting variable from int to float or float to double.it can be done using strict or explicit conversition.
4) A
It means variable= variable * 5
5) C
Logical error leads to display wrong output
6) A
Problem solving can be done using devide and conquer method
8) B
Event are user activities that interact with controls
9) A
The order in which the user would progress from control to control if they pressed tab
10) B
9/3 = 3
11) C
Trying to call in a file that does not exist
12) A
2.)Which character is used to denote a comment? A.) # B.) \ C.) % D.) '...
1) Which of the following is NOT true about a Python
variable?
a) A Python variable must have a value
b) A Python variable can be deleted
c) The lifetime of a Python variable is the whole duration of a
program execution.
d) A Python variable can have the value
None.
2) Given the code segment:
What is the result of executing the code segment?
a) Syntax error
b) Runtime error
c) No error
d) Logic error
3) What...
TASK Your task is to build a palindrome from an input string. A palindrome is a word that reads the same backward or forward. Your code will take the first 5 characters of the user input, and create a 9- character palindrome from it. Words shorter than 5 characters will result in a runtime error when you run your code. This is acceptable for this exercise – we will cover input validation in a later class. Some examples of input...
USE SCALA ONLY: Here is an example of “Our Language” 1. integer a 2. integer b 3. string name 4. a = 14 5. b = 27 6. c = a + b 7. name = “example program” 8. display name 9. display c 10. read a 11. b = a * a 12. display a 13. end Your interpreter will: (a) Create an empty Map[String, String] (b) Read the program (c) Print each line as it is read (d)...
Comments used to document code should: A. be used as little as possible B. be insightful and explain what the instruction's intention is C. only be included in code that is difficult to understand D. be used to define variables whose names are not easy to understand E. not be included with the program 2 points QUESTION 2 The main method for a Java program is defined by: A. public static main( ) B. public static main(String[ ] args);...
2) Write a function stringManip that takes in a character string and returns a character string following these rules: a) any vowel (a, e, i, o, u) is replaced by the character '&' b) any numeric character has 1 added to it (if it was 9, it becomes O instead) (str2num() is useful here) c) all lowercase characters become uppercase d) replace the final character with '!' e) append the length of the string before this step to the end...
Question 8 A C-string is a sequence of characters terminated by the null character. True False D Question 9 What is the longest C-string that can be put into this C-string variable? char s[9]; There is not enough information to determine the 8th Question 10 D AC string variable is just an array of characters without the null character. True False Question 11 5 pts If you have already removed a character in char variable ch) from the input stream,...
C Code Create a tool in which a user can enter a string (up to 25 characters) and choose how they wish to manipulate the string from a menu your program will display (see the run-through). The program will continue to ask for commands until the user enters the “quit” command. The commands are: • “Replace All” If a user types “replace all” using ANY sort of capitalization, your program will prompt the user to enter the character to change...
Hi everyone, I have a problem about C programming.
Background Material:
The figure 6 is as below:
The task:
Download the file 55.c. Study the C code, then build an
executable and run it to see what the output is. Modify the program
so that the output is The string in buffer is "In C the value of 12
+ 34 / 5 is 18." Do this by looking up decimal values for ASCII
codes in Figure 6 and typing...
Random access memory is _________________ . a. Persistent c. permanent b. Volatile d. sequential 2. Which of the following is not permanent storage? a. RAM c. A USB drive b. a hard disk d. all of these 3. Which of the following is not a File class method? a. Create() c. Exists() b. Delete() ...
Computer Science C++ Help, here's the question that needs to be answered (TASK D): Task D. Decryption Implement two decryption functions corresponding to the above ciphers. When decrypting ciphertext, ensure that the produced decrypted string is equal to the original plaintext: decryptCaesar(ciphertext, rshift) == plaintext decryptVigenere(ciphertext, keyword) == plaintext Write a program decryption.cpp that uses the above functions to demonstrate encryption and decryption for both ciphers. It should first ask the user to input plaintext, then ask for a right...