WorksheetsComputer Science "NOT FINISHED"
Total questions: 35
Worksheet time: 35mins
A logic gate:
accepts one input and converts it to a transistor.
converts a microchip to a transistor.
accepts input and produces output.
converts a transistor to a microchip.
What is the output for an AND logic gate when one input is True and one is False?
True
undefined
an error
False
What is the final outcome of p AND q OR r if p is 0, q is 1, and r is 1?
1
0
011
01
Boolean algebra is:
a way to create smaller microchips.
a collection of transistors.
the branch of math that deals with the values True and False.
algebra using hexadecimal numbers.
Which of the following are languages of computer ?
Machine Language
Assembly Language
High Level Language
All of above
Java, Python, PHP, and C++ are examples of
low level languages
Graphic arts languages
medium level languages
high level languages
What is machine code?
A programming language that a computer understands
The make and model of a computer
The serial number of a computer
Why do certain words change color in Python?
To show that they are recognized as key words.
To tell you that these words cannot be used in Python code.
To show you that these words can be clicked.
To tell Python to skip these words when running the code.
Symbols used for entering comments in Python ...?
# This is a Python comment
''' This is a Python comment '''
// This is a Python comment
/* This is a Python comment */
What is the output of an AND gate if its inputs are 1 and 1?
1
0
What is the output Y of this logic cricuit if A = 1, B = 1, and C = 1
0
1
What is the best explanation for why a computer uses boolean logic to manipulate True and False values?
It can only understand 0s and 1s
It runs instructions in a binary code
It doesn't have enough memory to store numbers above 1
It uses transistors which can only be on or off
A single logic gate is an electronic component made of transistors, which does what?
Performs calculations such as binary addition
Performs binary shifts left and right
Combines boolean inputs to produce a boolean output
Executes instructions stored in the main memory
A named blocks of code that are designed to do one specific job is called as________
Loop
Function
Block
Branching
Which keyword to be used to define a function in Python?
def
Local
Rec
Global
How many types of scopes in Python?
1
3
2
4
How many types of functions are there in
python?
2
4
5
6
A_____ variable declared inside the function’s body is known as
File scope
Global scope
Local scope
Function scope
What term is used to describe data passed into/out of a program?
Variable
Loop
Constant
Parameter
What is the difference between a subroutine and a function?
They are the same thing
A subroutine passes values back out to the program, a function does not
A function passes values back out to the program, a subroutine does not
A function can run without being called
What is the Python data type bool stand for?
string
integer
Boolean
float
What does the Python data type str stand for?
string
integer
Boolean
float
What does the Python data type float stand for?
string
integer
Boolean
float
What does the Python data type int stand for?
string
integer
Boolean
float
The type of data element temporarily stored in the computer memory defines:
storage space and the extent of its value
name and storage space
storage space and a storage value
storage value
the Miscellaneous data types are
short and long
date and boolean
string and char
integer and double
the integer data types are
string and char
byte and integer
date and boean
doulbe and decimal
The Binary Integer 01001101 is represented in Denary as:
73
75
77
79
Which one of these binary numbers is the normalised form of 6.5?
6.5 = 00000110.1
0.1011 0011
0.1101 0011
1.1001 0010
1.1010 1010
