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. Prints a string to the screen which is converted using repr()
~
%r
math.sqrt(a)
-=
2. Prints a string to the screen which is a signed decimal.
*read
%d
~
#
3. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
-
math.sqrt(a)
:
and
4. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
read
read
()
Variables
5. Greater than or equal symbol.
*
&
print
>=
6. modulus AND assignment operator
read
~
%=
%r
7. 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
n
.py
()
>>
8. Command to print to the screen
^
round()
print
argv
9. The keyword beginning a header that will create a new function.
%=
def
^
//=
10. adds an item to a list
append()
print()
<=
%r
11. Less than symbol
<
/
not
int()
12. The keyword beginning a header that will create a new function.
def
str()
/=
*=
13. add AND assignment operator
#
%s
~
+=
14. turns an object into a string
str()
float
==
=
15. divide AND assignment operator
else
*=
str()
/=
16. Symbol to divide by the number to the right of the symbol
-
/
append()
-=
17. 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
<<
readline
=
/
18. inserts an item inside a list at a certain index
/
readline
del
insert()
19. Symbol used to create comments
if
-=
#
is not
20. Function to open or read a file
&
def
open()
<<
21. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
readline
argument variable
~
()
22. 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.
%d
in
:
*
23. Empties the file - watch out if you care about the file.
*truncate
argument variable
-=
//=
24. modulus AND assignment operator
read
return
%=
/
25. An operator to check whether two variables refer to the same object.
is
|
%r
write
26. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
a%b
>=
=
int
27. End header line.
^
break
:
int()
28. exponentiation
<<
float
a**b
%s
29. A keyword that does nothing but fill space to indicate code which will be written later.
pass
try
math.sqrt(a)
for
30. unction to read one line of a file
in
math.sqrt(a)
//=
readline
31. Create a variable.
try
=
/=
raise
32. sets the file's current position
>>
%
truncate
file.seek()
33. A statement that displays a value on the screen.
print
str()
class
int()
34. A logical operator which requires two expressions to both be true.
|
and
readline
35. A logical operator which returns a value of True if either of the conditions is true.
*
%d
str()
or
36. Function to write something to a file
in
not
|
write
37. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
a**b
Variables
input()
try
38. Function to read the contents of a file
%d
print()
read
write
39. returns the length of a string (number of characters)
floating point number
len()
*read
in
40. divide AND assignment operator
input()
>=
/=
int()
41. Argument variable
def
/=
not
argv
42. reads just one line of a text file & keeps track of where in the file you're at
a**b
+=
file.readline()
%r
43. floor division AND assignment operator
or
//=
*write(stuff)
%r
44. add AND assignment operator
for
+=
()
/
45. Reads just one line of a text file.
>
n
==
*readline
46. square root
<=
*truncate
readline
math.sqrt(a)
47. writes stuff to the file
len()
file.write(stuff)
*
readline
48. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
or
%s
()
49. subtract AND assignment operator
is
str()
for
-=
50. assignment operator
a//b
or
a%b
=