SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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. Function to write something to a file
insert()
write
n
close
2. A data type for representing numbers with fractional values.
a//b
floating point number
read
def
3. multiply AND assignment operator
<
*=
*readline
4. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
str()
read
|
=
5. asks the user for a response and returns that response
float
return
input()
:
6. Prints a string to the screen which will be Unicode.
%s
*read
%
str()
7. Command to print to the screen
-=
==
/
print
8. A statement that assigns a value to a variable.
if
assignment
==
#
9. Function to read the contents of a file
*readline
input()
read
n
10. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.
read
*=
not in
print
11. turns an object into a string
str()
def
**=
insert()
12. 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).
-
==
is not
print
13. turns an object into an integer
def
abs(a)
int()
^
14. exponentiation
open()
str()
a**b
&
15. inserts an item inside a list at a certain index
insert()
%=
//=
<
16. Less than symbol
.py
<
or
readline
17. subtract AND assignment operator
-=
truncate
argument variable
insert()
18. square root
in
math.sqrt(a)
print
len()
19. Modulus operator. It's the remainder after division
round()
%
truncate
break
20. Less than or equal to symbol
float
input()
//=
<=
21. unction to read one line of a file
def
^
int()
readline
22. 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
>=
truncate
%s
<<
23. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
^
int
#
+
24. Greater than symbol
int()
>
~
&
25. Adds a new line character
/=
n
a//b
==
26. add AND assignment operator
a**b
%d
format string
+=
27. This keyword in the body of a conditional allows chained conditionals.
and
elif (Else if)
>=
%
28. An operator to check whether two variables refer to the same object.
==
abs(a)
is
*
29. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
round()
readline
except
Variables
30. 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
-
+
file.seek()
31. Adds something to a variable
=
-
a**b
>>
32. Symbol to add things together
*
+
*=
>
33. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
print()
|
return
()
34. A built-in function that converts integers and strings to floating-point numbers.
str()
write
*write(stuff)
float
35. adds an item to a list
append()
>
#
**=
36. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
#
~
*write(stuff)
.py
37. Symbol used to create comments
print
#
==
abs(a)
38. This keyword begins the simplest form of a conditional statement.
str
if
-
>=
39. Function to close a file - it will not be able to be used again unless the file is opened.
close
return
format string
>=
40. rounds a number to the number of decimal points you choose
round()
abs(a)
try
print
41. The keyword beginning a header that will create a new function.
n
in
def
int
42. Function to close a file - it will not be able to be used again unless the file is opened.
else
*readline
int()
close
43. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
<=
%s
return
in
44. Reads the contents of the file you can assign the result to a variable.
if
**=
round()
*read
45. modulo
assignment
a%b
*write(stuff)
len()
46. Turns a line into a comment instead of executable code.
argument variable
input()
#
a%b
47. Argument variable
break
round()
if
argv
48. An operator that removes a value from a list.
del
close
round()
not
49. Symbol to add things together
<=
-=
=
+
50. A logical operator which compares two operands and produces True if they are equal and False otherwise
append()
del
if
==