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. Prevents a runtime error from stopping the program.
except
&
math.sqrt(a)
<=
2. sets the file's current position
=
read
else
file.seek()
3. A statement that assigns a value to a variable.
file.readline()
assignment
*=
#
4. multiply AND assignment operator
continue
format string
==
*=
5. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
del
format string
+=
%r
6. Symbol to multiply things
read
is
*
*truncate
7. multiply AND assignment operator
-
()
%=
*=
8. Symbol used to create comments
#
input()
>=
-=
9. Function to open or read a file
round()
abs(a)
open()
def
10. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int
len()
<=
else
11. A logical operator which compares two operands and produces True if they are equal and False otherwise
readline
int()
append()
==
12. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
append()
print()
~
%d
13. The keyword beginning a header that will create a new function.
int()
int()
in
def
14. This keyword in the body of a conditional - gives an alternative execution.
else
append()
return
format string
15. modulo
a%b
insert()
in
>>
16. Writes stuff to the file.
print
*write(stuff)
print
/=
17. A data type for representing numbers with fractional values.
floating point number
def
a**b
print
18. turns an object into a string
*
str()
a//b
+=
19. turns an object into a string
//=
str()
%d
-=
20. Function to empty the contents of a file - no recovery is possible
print
*write(stuff)
truncate
>>
21. Adds a new line character
n
round()
is not
class
22. Turns a line into a comment instead of executable code.
file.truncate()
#
and
round()
23. add AND assignment operator
+=
del
<<
insert()
24. This keyword in the body of a conditional allows chained conditionals.
write
=
elif (Else if)
def
25. Function to read the contents of a file
**=
%s
read
insert()
26. Where the parameters go. A necessary punctuation after any function even if it's empty.
and
abs(a)
int
()
27. The keyword beginning a header that will create a new function.
-=
read
str()
def
28. writes stuff to the file
math.sqrt(a)
file.write(stuff)
%r
+
29. 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
>>
#
-=
insert()
30. divide AND assignment operator
del
argument variable
readline
/=
31. Less than symbol
input()
//=
<
-=
32. This keyword begins a header for a body that repeats until the condition is no longer true.
>>
append()
while
33. Modulus operator. It's the remainder after division
int
math.sqrt(a)
%
>=
34. Function to close a file - it will not be able to be used again unless the file is opened.
-=
close
&
input()
35. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
/
|
>
=
36. exponent AND assignment operator
a**b
**=
input()
*
37. Command to print to the screen
%=
%
a**b
print
38. Function to empty the contents of a file - no recovery is possible
not in
truncate
>=
print()
39. An operator to check whether two variables refer to the same object.
<<
=
argv
is
40. exponent AND assignment operator
%d
*=
len()
**=
41. returns the length of a string (number of characters)
*truncate
:
>>
len()
42. subtract AND assignment operator
()
readline
-=
argv
43. Reads the contents of the file you can assign the result to a variable.
input()
=
*read
else
44. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000
==
<<
&
>=
45. Where the parameters go. A necessary punctuation after any function even if it's empty.
len()
>>
*=
()
46. Adds something to a variable
file.seek()
*=
file.truncate()
=
47. This keyword begins the simplest form of a conditional statement.
floating point number
=
==
if
48. floor division
Variables
a//b
//=
*readline
49. Adds something to a variable
*truncate
=
%=
elif (Else if)
50. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.
if
in
insert()
|