WorksheetsUnit 2 review
Total questions: 42
Worksheet time: 28mins
A numbering system that uses ten digits, 0 through 9.
Hexidecimal System
Binary System
Octal System
Decimal System
A numbering system that uses two digits, 0 and 1.
Octal System
Hexadecimal System
Binary System
Decimal System
A group of eight bits joined together.
Octabit
Kilobit
Byte
Encoded Integer
The most common format for text files in computers on the internet where each character is represented by a unique 7-bit binary code.
Unicode
Encoded Text
ASCII
Encoded Integer
Formed by eight bits or data.
Byte
Formed by 1000 bytes.
Kilobyte (KB)
Formed by 1,000,000 bytes
Megabyte (MB)
Formed by 1000,000,000 bytes
Gigabyte (GB)
Formed by 1,000,000,000,000 bytes
Terabyte
Match the following Binary to Decimal
00101111
47
10101011
171
10000011
131
11100011
227
01110001
113
Match the following Binary to Decimal
01111000
120
11110010
242
10010010
146
00010010
18
00101110
46
Import means
A named, reusable set of programming statements to perform a specific task.
A programming statement that allows a block of code to be repeated for a given range of values.
To bring reusable code or data into a program from another program or module.
Any data or information entered into a computer.
A file or set of files with related variables, functions, and classes that can be reused in other programs defines
loop
module
comments
expression
A pixel is
a set of instructions written in a language computers can understand.
a single image in a moving sequence for animation, video, or computer graphics.
a value passed to a function
the small dots of color that make up images on a computer screen.
The spelling and grammar rules of a programming language is called
GSP
syntax
code
comments
Variables are
any valid set of values, variables, operators and functions that produce a value or result.
unpredictable sequences of numbers evenly distributed over a certain range.
a sequence of characters, which can include letters, numbers, symbols, punctuation and spacing.
named values that can change.
A string is
A named value that can change.
A sequence of characters, which can include letters, numbers, symbols, punctuation and spacing.
A file or set of files with related variables, functions, and classes that can be reused in other programs.
A named, reusable set of programming statements to perform a specific task.
What computer science concept stores information to be used later?
Conditional
Variable
Loop
Function
What data type can hold more than one value?
String
Integer
List
Boolean
What data type would store the value: 6.4?
String
List
Boolean
Float
What data type would store the value: Oranges
String
Float
Boolean
Integer
What data value would store the value: 9?
Float
Integer
String
Boolean
What symbol is used to either add two numbers together or join two strings?
-
=
+
*
What symbol is used to multiply two numbers together?
+
=
*
/
Which of the statements is used to import all names from a module into the current calling module
import
from
dir()
import*
random.randint(3,8)
4,5,6,7
3,4,5,6,7
3,4,5,6,7,8
0,1,2,3,4,5,6,7,8
Which function truncates the fractional part of given number and returns only the integer or whole part.
int()
round()
oct()
hex()
In python which is the correct method to load a module math?
include math
import math
#include<math.h>
using math
In python, what is a function?
Built-in tools, such as print
Text in parentheses
The name of a variable
The result of the code, what is seen when it runs
Info a program receives from a user is:
Input
Output
String
Comment
Error
A series of letters, numbers, or symbols in quotation marks is:
Input
Output
String
Comment
Error
What is it called when you join two strings together with the + symbol?
Assignment
Concatenation
Value
Float
Integer
What is the process for storing a variable? (x = y, for example?)
Assignment
Concatenation
Value
Float
Integer
Match the following
This changes the data type of a value to a string (if applicable)
str
This returns the square root of a value
sqrt
This converts the number to a float (if possible) and returns the absolute float value
fabs
This takes two arguments and returns one to the power of the other
pow
Match the following
This convert real numbers or integers into floating point numbers
float()
This returns the square root of a value
sqrt
This converts the number to a float (if possible) and returns the absolute float value
fabs
This changes the data type of a value to an int (if applicable)
int
Give a number might this code might generate:
import random
random.randint(2,6)
(a)
Consider the following code:
a= 5
b= 2
a ** b
Match the four basic number operations in programming to their symbol used in python.
addition
+
subtraction
-
multiply
*
divide
/
Modular division returns the remainder of a division problem. To use this in Python, the (a) symbol is used.
Type in the code that is missing.
import math
num = int(input(" Enter a number: "))
print("The final outcome is: " + (a) ( math.sqrt(math.fabs(num))) )
Type in the missing code.
_______ ______
x = float(input("Enter a number: "))
y = int(x)
x = x - y
print("The final outcome is: " + str(math.fabs(x)))
(a)
