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. A data type for representing numbers with fractional values.
except
floating point number
*=
not
2. This keyword in the body of a conditional - gives an alternative execution.
<=
else
*=
>>
3. The keyword beginning a header that will create a new function.
def
continue
while
4. 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
file.truncate()
>>
+
raise
5. Function to empty the contents of a file - no recovery is possible
=
^
truncate
=
6. Prints a string to the screen which is converted using repr()
%
==
%r
del
7. Prints a string to the screen which is converted using repr()
n
%r
int()
append()
8. End header line.
a//b
~
a**b
:
9. Evaluates to false if the variables on either side of the operator point to the same object and true otherwise. x is not y - here is not results in 1 if id(x) is not equal to id(y).
a**b
=
is not
float
10. Turns a line into a comment instead of executable code.
|
:
insert()
#
11. 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.
-
argument variable
and
close
12. A logical operator which negates an expression so that it returns a value of True if the expression is false.
#
not
file.seek()
round()
13. Function to write something to a file
write
and
>>
len()
14. Modulus operator. It's the remainder after division
del
%
*write(stuff)
append()
15. subtract AND assignment operator
-=
while
%d
+
16. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
-
input()
%r
17. deletes an item from a list
insert()
def
del
argument variable
18. Greater than or equal symbol.
>=
/
n
^
19. deletes an item from a list
del
def
input()
>
20. 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
/=
^
a%b
not
21. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
open()
//=
n
~
22. This keyword begins the simplest form of a conditional statement.
*write(stuff)
argv
str
if
23. prints its parameter to the console
close
/
=
print()
24. absolute value
abs(a)
a%b
+
25. Prevents a runtime error from stopping the program.
except
*=
:
=
26. asks the user for a response and returns that response
len()
input()
for
argv
27. Less than symbol
not
assignment
argv
<
28. floor division AND assignment operator
//=
read
#
*read
29. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
math.sqrt(a)
return
~
print
30. This keyword begins the simplest form of a conditional statement.
#
if
n
^
31. Greater than or equal symbol.
>
format string
<<
>=
32. Function to read the contents of a file
read
~
round()
float
33. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
and
input()
-=
insert()
34. A logical operator which returns a value of True if either of the conditions is true.
>
close
or
len()
35. An operator that removes a value from a list.
close
a**b
n
del
36. subtract AND assignment operator
*=
else
-=
write
37. Command to print to the screen
truncate
print
and
a//b
38. Symbol to multiply things
else
-=
*
^
39. Function to close a file - it will not be able to be used again unless the file is opened.
close
%d
pass
read
40. Prints a string to the screen which is a signed decimal.
>
Variables
%d
<<
41. A logical operator which requires two expressions to both be true.
%
<<
and
open()
42. A statement that displays a value on the screen.
print
:
n
%s
43. Symbol to divide by the number to the right of the symbol
/
and
not in
^
44. Symbol to add things together
print()
def
/
+
45. divide AND assignment operator
read
/=
or
+=
46. absolute value
==
argv
abs(a)
:
47. add AND assignment operator
a%b
close
+=
assignment
48. asks the user for a response and returns that response
or
input()
**=
#
49. Argument variable
argv
>>
<
+
50. Less than or equal to symbol
abs(a)
/
<=
<