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. 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).
argv
is not
<<
2. 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
.py
^
a**b
3. Less than or equal to symbol
int()
>
<=
or
4. Symbol to add things together
.py
**=
+
=
5. adds an item to a list
del
%d
append()
file.seek()
6. Symbol to multiply things
input()
*
round()
%=
7. This keyword in the body of a conditional - gives an alternative execution.
()
%
else
^
8. floor division AND assignment operator
=
//=
a%b
round()
9. subtract AND assignment operator
=
Variables
-=
%=
10. Symbol to add things together
:
continue
+
//=
11. Greater than symbol
>
pass
truncate
/
12. Less than or equal to symbol
math.sqrt(a)
append()
format string
<=
13. The keyword beginning a header that will create a new function.
is
-
+=
def
14. This keyword begins the simplest form of a conditional statement.
+=
print()
truncate
if
15. 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
<<
=
-=
int()
16. square root
close
open()
is not
math.sqrt(a)
17. Less than symbol
^
<
>
abs(a)
18. Function to write something to a file
n
input()
-
write
19. 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
#
write
>>
20. The keyword beginning a header that will create a loop.
for
+=
write
truncate
21. 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.seek()
<=
>>
for
22. divide AND assignment operator
>
-
/=
*readline
23. rounds a number to the number of decimal points you choose
round()
return
for
Variables
24. assignment operator
and
print
=
>>
25. rounds a number to the number of decimal points you choose
format string
and
round()
in
26. square root
math.sqrt(a)
round()
append()
/
27. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
/=
%s
else
28. Command to print to the screen
print
insert()
round()
>
29. Reads the contents of the file you can assign the result to a variable.
%s
/
*read
append()
30. An operator to check whether two variables refer to the same object.
*read
readline
argument variable
is
31. 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.
while
print()
readline
argument variable
32. Greater than or equal symbol.
abs(a)
file.truncate()
//=
>=
33. asks the user for a response and returns that response
del
input()
len()
*read
34. ,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.
<
*read
return
35. A logical operator which returns a value of True if either of the conditions is true.
//=
or
insert()
print()
36. returns the length of a string (number of characters)
>=
len()
str
:
37. returns the length of a string (number of characters)
len()
in
n
readline
38. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int
|
*read
+
39. assignment operator
=
.py
a//b
%r
40. Prints a string to the screen which is a signed decimal.
%d
n
%r
*write(stuff)
41. Argument variable
argv
floating point number
len()
for
42. Adds a new line character
def
>>
#
n
43. deletes an item from a list
del
append()
*=
close
44. Create a variable.
%r
#
=
*=
45. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
abs(a)
~
a**b
Variables
46. add AND assignment operator
=
+=
round()
or
47. A built-in function that converts integers and strings to floating-point numbers.
float
:
not
=
48. Symbol used to create comments
and
-=
**=
#
49. Create a variable.
=
argv
a**b
+
50. prints its parameter to the console
argv
<=
print()
readline