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. Less than or equal to symbol
float
*
<=
break
2. turns an object into a string
str()
Variables
**=
abs(a)
3. This keyword in the body of a conditional - gives an alternative execution.
int()
=
argv
else
4. Function to write something to a file
write
.py
&
open()
5. modulus AND assignment operator
argv
str()
%=
open()
6. This keyword begins a header for a body that repeats until the condition is no longer true.
del
>=
while
^
7. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
and
-=
**=
Variables
8. Adds a new line character
n
write
+=
return
9. This keyword in the body of a conditional - gives an alternative execution.
%r
def
else
-=
10. returns the length of a string (number of characters)
len()
()
#
print
11. divide AND assignment operator
pass
/=
()
print()
12. Prevents a runtime error from stopping the program.
except
def
==
append()
13. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
argv
~
del
%=
14. Symbol to divide by the number to the right of the symbol
&
del
//=
/
15. turns an object into an integer
int()
/=
/=
if
16. Symbol used to create comments
#
print
**=
insert()
17. 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
>
%d
continue
>>
18. rounds a number to the number of decimal points you choose
close
round()
def
()
19. Adds something to a variable
abs(a)
argv
str()
=
20. deletes an item from a list
%r
+
>>
del
21. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
%=
=
|
for
22. This keyword begins the simplest form of a conditional statement.
:
if
print
not
23. writes stuff to the file
%d
/=
print
file.write(stuff)
24. Less than or equal to symbol
#
file.readline()
<=
=
25. multiply AND assignment operator
<<
*=
a**b
readline
26. assignment operator
=
int()
elif (Else if)
-=
27. floor division
n
.py
append()
a//b
28. 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.
=
%r
argument variable
>>
29. Symbol to multiply things
append()
*readline
input()
*
30. Adds something to a variable
abs(a)
/
-=
=
31. An operator to check whether two variables refer to the same object.
*
is
*=
except
32. A data type for representing numbers with fractional values.
%d
write
floating point number
print
33. asks the user for a response and returns that response
input()
Variables
while
:
34. A logical operator which compares two operands and produces True if they are equal and False otherwise
>=
*
==
:
35. 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
%
~
^
/
36. End header line.
insert()
else
:
37. exponentiation
a**b
pass
a%b
=
38. modulo
a%b
<=
^
*
39. 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
/=
()
not
40. adds an item to a list
truncate
except
append()
<=
41. Function to empty the contents of a file - no recovery is possible
%d
<=
truncate
print()
42. 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
print
^
continue
*=
43. Where the parameters go. A necessary punctuation after any function even if it's empty.
**=
()
if
len()
44. A built-in function that converts integers and strings to floating-point numbers.
Variables
int
float
abs(a)
45. A statement that assigns a value to a variable.
/
assignment
truncate
+=
46. Adds a new line character
:
>=
/=
n
47. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
print
Variables
-=
read
48. Prints a string to the screen which will be Unicode.
file.readline()
%s
=
-=
49. asks the user for a response and returns that response
a**b
<<
input()
is not
50. An operator that removes a value from a list.
truncate
write
%d
del