Font size
WorksheetsMidterm Exam
Total questions: 55
Worksheet time: 36mins
Any activity that uses computers.
Computing
Processing
Programming
None of the option
The process of preparing a program for execution by initializing device memory with the program's code and data
Computing
Loading
Programming
None of the option
The act of creating instructions for a computer to carry out.
Computing
Loading
Programming
None of the option
Takes less code to get things done
Interpreter
Compiler
Printer
None of the option
Faster Development
Interpreter
Compiler
Printer
None of the option
Harder to debug
Interpreter
Compiler
Printer
None of the option
Takes more code to get things done
Interpreter
Compiler
Printer
None of the option
A general purpose _______ programming language
Interpreter
Compiler
Printer
None of the option
Little abstraction with memory
Low Level
Medium Level
High Level
None of the option
High abstraction with memory
Low Level
Medium Level
High Level
None of the option
Flexible syntax and easy to learn
Low Level
Medium Level
High Level
None of the option
Best performance
Low Level
Medium Level
High Level
None of the option
A command line interface
Pseudo code
Algorithm
Console
None of the option
An unambiguous specification of how to solve a class of problems.
Pseudo code
Algorithm
Console
None of the option
a detailed yet readable description of what a computer program must do
Pseudo code
Algorithm
Console
None of the option
A programming paradigm, derived from structured programming
Procedural Programming
Object
oriented
Integrated Development Environment
None of the option
a software application that provides comprehensive facilities to computer programmers for software
Procedural Programming
Object
oriented
Integrated Development Environment
None of the option
Large programs are divided into smaller parts known as objects
Procedural Programming
Object
oriented
Integrated Development Environment
None of the option
Large program are divided into smaller parts known as function
Procedural Programming
Object
oriented
Integrated Development Environment
None of the option
Developer of Python
Guido Van Rossum
Willem Van Gogh
Ronjie Malinao
None of the option
Python 3 was released in the year
2008
1990
2010
None of the option
the process of finding and resolving defects or problems within a computer program
correcting
debugging
tracing
None of the option
A name given to an entity, which distinctly identifies an entity in a program at the time of its execution.
Variable
Identifier
Value
None of the option
The content of some variable
Variable
Identifier
Value
None of the option
Alphanumeric that hold values, like integers, strings of characters, and others.
Variable
Identifier
Value
None of the option
The value a variable when it doesn’t actually have a value.
null
0
none
None of the option
FirstName_LastName="Ronjie Malinao"
With Violation
No Violation
FirstName&LastName="Ronjie Malinao"
With Violation
No Violation
FirstName LastName="Ronjie Malinao"
With Violation
No Violation
1stname="Ronjie"
With Violation
No Violation
print="Ronjie"
With Violation
No Violation
str="ronjie"
With Violation
No Violation
day="Saturday"
With Violation
No Violation
Variables used for whole numbers
Integer
Complex
Float
Boolean
String
Variables that is represented by complex class. It is specified as (real part) + (imaginary part)j
Integer
Complex
Float
Boolean
String
Variables used to store real numbers.
Integer
Complex
Float
Boolean
String
Variables used to store True or False
Integer
Complex
Float
Boolean
String
Variables used to store text or characters
Integer
Complex
Float
Boolean
String
identify the variable type
numbers= {1: isa ', 2: dalawa ', 3: tatlo '}
Dictionary
List
Tuple
None of the above
identify the variable type
Subjects = ["Prog1", "PE2", "Ethics"]
Dictionary
List
Tuple
None of the above
identify the variable type
Subjects = ("Prog1", "PE2", "Arts")
Dictionary
List
Tuple
None of the above
The datatype is identified when the program runs
True
False
Variables can be reassigned at any time
True
False
The original output formatting of python
% formatting
str.format ()
f string format
None of the above
It uses normal function call syntax and is extensible through the format() method
% formatting
str.format ()
f string format
None of the above
or 'F'. These strings may contain replacement fields, which are
expressions delimited by curly braces {}.
% formatting
str.format ()
f string format
None of the above
Causes the subsequent character sequence to “escape” its usual meaning.
% formatting
str.format ()
f string format
None of the above
What will be the output of the following code?
x = 8
y = 3
r = x - y
y = 2
print(r)
(a)
What will be the output of the following code?
x = 14
y = 3
print(x // y)
(a)
What will be the output of the following code?
x = 14
y = 3
print(x % y)
(a)
What will be the output of the following code?
x = 3
y = 2
print(x ** y)
(a)
What will be the output of the following code?
x = 5
y = 2
print(f"{x / y}")
(a)
What will be the output of the following code?
x = 5
y = 5
print(x * y * x)
(a)
What will be the output of the following code?
x = 5
y = 5
print(x + y + x + y)
(a)
Discount Computation Program
This is a discount computation program; debug the code to produce the correct result
#1 prize=int(input("Enter price: "))
#2 discount = int(input("Enter discount %: "))
#3 discount = price ** discount
#4 discount = discount % 100
#5 total = price + discount
#6 print("Total less discount: ",total)
#7 payment = float(input("Payment: "))
#8 change = total - payment
#9 print(f"Change:",change)
what is the correct variable name
prize=int(input("Enter price: "))
total
cost
none of the above
What is the correct operator
discount = price ** discount
+
-
/
what is the correct operator
discount = discount % 100
*
-
+
what is the correct variable name
prize=int(input("Enter price: "))
cost
total
none of the above
What is the correct code
change = total - payment
change = total - payment
change = payment - total
total = change - total
total = payment - change
What is the correct code
print(f"Change:",change)
print("Change:',change)
print(f"Change: change")
print(f"Change: {change}")
print("Change: change")
print(f"Change:"%change)
