NEW
Font size
S
M
L
XL
WorksheetsPrograming Revision
Total questions: 15
Worksheet time: 5mins
Name
Class
Date
1.
What programming language are you currently learning?
a)
Python4
b)
C
c)
IDLE
d)
Python3
2.
Which order is correct?
Top = highest level language
Bottom = lowest level language
Top = highest level language
Bottom = lowest level language
a)
English
Source Code
Assembly
Machine Code
Binary Code
Source Code
Assembly
Machine Code
Binary Code
b)
English
Source Code
Machine Code
Assembly
Binary Code
Source Code
Machine Code
Assembly
Binary Code
c)
English
Korean
Source Code
Assembly
Machine Code
Binary Code
Korean
Source Code
Assembly
Machine Code
Binary Code
d)
Source Code
Assembly
Machine Code
Binary Code
Assembly
Machine Code
Binary Code
3.
What is a .exe file?
a)
Expandable file
b)
Exquisite file
c)
Enhance Simplex Image
d)
Executable file
4.
What is the role of the compiler?
a)
Compresses code
b)
Converts higher level code into machine code.
c)
Compresses files
d)
Converts spoken language into code.
5.
What advantage does java have over C++?
a)
Java runs in a virtual environment.
b)
It is a more advance language.
c)
Java is more ideal for complex programs.
d)
C++ is just bad in general.
6.
What is a computer program?
a)
A file full of code.
b)
An application designed to speed up your computer.
c)
A storage device.
d)
A series of instructions that preform a task.
7.
How do you output a string to the screen?
a)
output()
b)
say("")
c)
print("")
d)
print()
8.
Which is correct?
a)
else()
b)
else("")
c)
else:
d)
else;
9.
What is the purpose of the colon symbol (:)?
a)
Ends the program.
b)
Tell's python to ignore the next bit.
c)
Error checks the next bit.
d)
Tell's python that is has to do the next bit.
10.
How do you comment in python?
a)
comment: this is a comment
b)
#this is a comment
c)
/* this is a comment */
d)
ignore("this is a comment")
11.
How do you ask the user to type something and save it as a whole number?
a)
This question is badly phrased.
b)
usersNumber = int(input(" Type a number:"))
c)
ask("Type a number")
answer = usersNumber
answer = usersNumber
d)
usersNumber = print("Type a number")
12.
What function would you type to create a user defined function?
a)
def
b)
userfun
c)
cusfun
d)
createfunction
13.
What is the purpose of a while loop?
a)
Repeats a section of code forever.
b)
Repeats a section of code a set amount of times.
c)
Repeats a section of code while the user provides input.
d)
Repeats a section of code providing a certain condition is true.
14.
What is the purpose of a for loop?
a)
Repeats a section of code providing a certain condition is true.
b)
Repeats a section of code a set amount of times.
c)
Repeats a section of code until a certain event happens.
d)
For loops do not exist.
15.
What is the purpose of an if statement?
a)
Checks to see if something is true and then outputs the result.
b)
Used to validate a variable.
c)
Preforms a function if a statement is true.
d)
Repeats a section of code providing a certain condition is true.
Reset
