Question: 1. The symbols >,
1. The symbols >, <, and == are considered to be
| a. | relational operators | |
| b. | logical operators | |
| c. | conditional operators | |
| d. | ternary operators |
2. A variable that is visible to every function in the program file is called a
| a. | local variable | |
| b. | universal variable | |
| c. | program variable | |
| d. | global variable |
3. When a program is finished using a file, it should do this.
| a. | Erase the file | |
| b. | Open the file | |
| c. | Close the file | |
| d. | Encrypt the file |
4. This statement causes a function to end and sends a value back to the part of the program that called the function.
| a. | end | |
| b. | send | |
| c. | return | |
| d. | exit |
5. What does the following code display?
name = "Tristan Dean Ross"
print(name.split()[-2])
| a.Tristan | ||
| b. | Dean | |
| c. | Ross | |
| d. | None of the above |
6. Which of the following is used to open a file "C:\myFile.txt" for appending data?
| a. | outfile = open(C:\\myFile.txt, a) | |
| b. | outfile = open(C:\\myFile.txt, rw) | |
| c. | outfile = open(C:\\myFile.txt, w) | |
| d. | outfile = open(file=C:\\myFile.txt, w) |
7. A file that data is read from is known as a(n)
| a. | input file | |
| b. | output file | |
| c. | sequential access file | |
| d. | binary file |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
