Programming 4th Periodical Exam
Programming 4th Periodical Exam
2. In what year the Python 1.0 was released with new features like: lambda, map, filter, and reduce.
a.1989 c. 1991
b. 1994 d. 2008
6. Sum = 5+8
print(‘sum’)
a. 5*8 c. sum
b. Null d. 40
8. X = 3, y = 6
print(y=6)
a. Y=6 c. 6
b. Error d. ‘y=6’
9. sum = 6+8+5+7
average = sum / 4
print(sum)
a. 26 c. 6.5
b. sum d. ‘sum’
10. a = 5, e = 5, e = 9. What is the value of e?
a. 5 c. 9
b. 5, 9 d. Null
15. It should have names that are close or related to the value they hold or represent.
a. keywords c. variables
b. identifiers d. comments
17. Another way of putting comments is to enclose the comments with this symbol.
a. “”” “”” c. “”” “”
b. ‘” “ d. “ “’
23. It makes a program easy to understand, and describe what’s going on inside a program.
a. keywords c. comments
b. identifiers d. statements
24. An exact example of an assignment statement.
a. c = 5 c. a = 3*4
b. sum = a+b+c d. print(z)
37.
38.
ll. Create a program statement of the following, and a flowchart of the program. 5pts each
A. Create a program that will ask the user to enter a score of a test.
passingscore = 7.5
if the score entered is equal or greater than 7.5
Output You pass the test
if score is equal or below 7.5
Output You failed the test