Fundamentals of Programming
1. Syntax is the rules that you must follow when coding programs.
2. Strings and numbers are two simple data types used in computers.
3. Syntax errors must be corrected before your program will execute.
4. A variable is a data element that is created in secondary storage.
5. Two basic approaches used to design program logic include using flowhcharts and pseudocode.
6. A runtime error typically means that your program “crashes” with a fatal error.
7. It is a good practice to compare data with different types.
8. Structured programming provides only one entry point and one exit point for a logic structure.
9.Concatenation and addition are operations that basically do the same thing because they both use the "+" sign for the operator.
10. Placing comments in acomputer program make it less efficient and waste time and money.
11. Which function is not used to convert data types and values:
12. Which of the following is not a valid relational operator:
13. A loop that uses a counter requires:
a. initialize counter, test for completion, break
b. continue, return, break
c. initialize counter, test for completion, process block, increment counter
d. process block, return
14. A string can be described as a(n):
15. If A is a string, and B is a string, then the statement C=A+B would:
a. add A and B
b. set B equal to C
c. create a new string C byconcatenating A and B
d. set A equal to B
16. ing that contains value “PYTHON”, what would A[2:4] represent:
17. A tuple can best be described as:
19.A type error means that the programmer has:
a. made a typing mistake
b.programmed a syntax error
c. mixed data types in an operation
d. mixed upper and lowercase data
20. Making decisions can be made using:
a. single alternative
b. dual alternative
c. multiple alternative
d. all of the above
21. For each statement, enter a number from the column at the right that best matches what the statement represents.
Get Free Quote!
292 Experts Online