0% found this document useful (0 votes)
47 views4 pages

Programming 4th Periodical Exam

1. The document is a practice exam on computer programming concepts in Python. 2. It contains multiple choice and true/false questions that test knowledge of Python basics like variables, data types, operators, functions, and control structures. 3. It also contains short programming problems to write the code and draw a flowchart for a program that checks a test score against a passing threshold and a simple calculator program.

Uploaded by

Rafael Buta Jr.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views4 pages

Programming 4th Periodical Exam

1. The document is a practice exam on computer programming concepts in Python. 2. It contains multiple choice and true/false questions that test knowledge of Python basics like variables, data types, operators, functions, and control structures. 3. It also contains short programming problems to write the code and draw a flowchart for a program that checks a test score against a passing threshold and a simple calculator program.

Uploaded by

Rafael Buta Jr.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

T.R. YANGCO CATHOLIC EDUCATIONAL INSTITUTE,INC.

SAN JUAN, SAN ANTONIO, ZAMBALES

4th Periodical Exam


Computer Programming
St. Peter – St. Paul
Name:________________________________ Date:_____________________
Grade & Section:_______________________ Score:____________________

I. Encircle the letter of the correct answer.

1. PYTHON was created by?


a. Isaac Newton c. Alexander Graham
b. Bill Gates d. Bell Guido Van Rossum

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

3. A name used to refer memory location


a. Variable c. String
b. Functions d. Keyword

4. It is also known as Identifier and use to hold value.


a. Python c. alpha numeric
b. numeric d. variable

5. What operator is used to assign value to a variable?


a. + c. /
b. = d. *

6. Sum = 5+8
print(‘sum’)
a. 5*8 c. sum
b. Null d. 40

7. num1 = 4, num2 = 3, sum = 4 + 3


print(sum)
a. 7 c. 1
b. 3 d. num1 + num2

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

11. The names given to entities like classes, functions.


a. Comments c. variables
b. identifiers d. keywords

12. The reserved words in python.


a. Comments c. variables
b. identifiers d. keywords

13. It is a case sensitive that’s why we must be carefull in writing them.


a. keywords c. variables
b. identifiers d. comments

14. It helps to differentiate one entity from another.


a. keywords c. variables
b. identifiers d. comments

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

16. A symbol used in Python in writing a comments


a. () c. []
b. {} d. #

17. Another way of putting comments is to enclose the comments with this symbol.
a. “”” “”” c. “”” “”
b. ‘” “ d. “ “’

18. Multiple words can be separated using this symbol.


a. ; c. :
b. _ d. ,

19. Variables should have names that are?


a. close to the next line c. close to the title of the program
b. close to the preceding line d. close to the value they hold

20. The variable is written as one word or?


a. without any spaces c. can have two spaces
b. with only one space d. one space in the middle

21. The commands that Python can execute are called?


a. keywords c. comments
b. identifiers d. statements

22. Most of the programming languages used to define a block of code.


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)

25. A Python use to define a block of code.


a. keywords c. comments
b. indentation d. statements

26.What is the value of a?


a=6
b=5
a=9
print(a)
a. 6 c. 9
b. 5 d. error

27. It compares two value.


a. = c. !=
b. == d. !!

28. It means NOT EQUAL


a. = c. !=
b. == d. !!

29. It defines a variable with a fractional value.


a. integer c. set
b. string d. float

30. A sequence of characters


a. list c. statement
b. set d. string

31. What is the output of this program?


X = 79
Y = 79
Print(x is not y)
a. True c. Error message
b. False d. 79

32. What is the output of this program?


Var = “Python”
Var = “Programming
Print(var)
a. Error message c. Programming
b. Python d. Python Programming

33. An ordered sequence of items.


a. list c. statement
b. set d. string

34. What data type is 3.143?


a. int c. string
b. float d. def
35. An unordered collection of unique numbers.
a. list c. statement
b. set d. string

The keywords in Python that should be capitalized.


36.

37.

38.

39. The function to be used to identify characters or words


a. str() c. int()
b. set() d. string()
40. The function to be used to identify decimal number(s)
a. str() c. int()
b. set() d. string()

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

B. Create a program of a simple calculator.


Addition
Subtraction
Multiplication These choices should be seen in the output
Division

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy