SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Basic Python Programming
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.
%s
for
insert()
2. Symbol to add things together
argv
+
break
int()
3. rounds a number to the number of decimal points you choose
else
round()
-=
in
4. reads just one line of a text file & keeps track of where in the file you're at
/=
file.readline()
>>
int
5. This statement exits a function. The remaining lines of the function are not executed.
return
argv
>=
def
6. single line comment
*
str()
round()
#
7. Argument variable
try
-=
math.sqrt(a)
argv
8. A statement that ends the current iteration of a loop but continues looping.
continue
a//b
*truncate
math.sqrt(a)
9. divide AND assignment operator
read
try
=
/=
10. Prints a string to the screen which is converted using repr()
int()
<=
<<
%r
11. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
format string
print()
-=
//=
12. Command to print to the screen
*
open()
print
a//b
13. inserts an item inside a list at a certain index
<<
insert()
write
/=
14. A data type for representing numbers with fractional values.
try
|
()
floating point number
15. Modulus operator. It's the remainder after division
file.readline()
print()
readline
%
16. Greater than symbol
>
*=
is not
abs(a)
17. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
for
argument variable
except
18. A logical operator which compares two operands and produces True if they are equal and False otherwise
float
continue
file.write(stuff)
==
19. The keyword beginning a header that will create a new function.
<<
def
del
is not
20. A built-in function that converts integers and strings to floating-point numbers.
+=
float
-=
return
21. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
print()
try
len()
write
22. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.
or
==
except
argument variable
23. Adds something to a variable
assignment
argument variable
if
=
24. Greater than or equal symbol.
str()
<<
>=
is not
25. returns the length of a string (number of characters)
close
/=
len()
//=
26. End header line.
open()
:
=
|
27. Function to open or read a file
print()
for
open()
#
28. Binary XOR Operator copies the bit if it is set in one operand but not both. (a ^ b) will give 49 which is 0011 0001
^
write
%
print()
29. An operator to check whether two variables refer to the same object.
()
truncate
*
is
30. A statement that displays a value on the screen.
()
open()
del
print
31. assignment operator
str
is
=
def
32. Command to print to the screen
>>
^
print
write
33. Function to close a file - it will not be able to be used again unless the file is opened.
%s
print
return
close
34. square root
print
math.sqrt(a)
n
else
35. unction to read one line of a file
a**b
>=
**=
readline
36. modulo
>=
~
truncate
a%b
37. square root
math.sqrt(a)
append()
*readline
readline
38. subtract AND assignment operator
elif (Else if)
+=
argv
-=
39. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
int
~
Variables
if
40. empties the file
#
str()
==
file.truncate()
41. Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. a >> 2 will give 15 which is 0000 1111
del
^
append()
>>
42. A logical operator which compares two operands and produces True if they are equal and False otherwise
Variables
a//b
math.sqrt(a)
==
43. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
is
len()
int
truncate
44. This keyword in the body of a conditional - gives an alternative execution.
<=
pass
else
*
45. unction to read one line of a file
while
/
readline
n
46. exponentiation
not
a**b
del
=
47. asks the user for a response and returns that response
del
input()
pass
|
48. The keyword beginning a header that will create a loop.
close
for
/=
+
49. A statement that assigns a value to a variable.
assignment
*=
<
n
50. prints its parameter to the console
def
def
print()
#