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. inserts an item inside a list at a certain index
+=
-
&
insert()
2. Greater than or equal symbol.
insert()
>=
def
*
3. A logical operator which requires two expressions to both be true.
*=
%s
and
~
4. multiply AND assignment operator
<<
.py
%
*=
5. prints its parameter to the console
a//b
try
+
print()
6. Prints a string to the screen which is converted using repr()
input()
a%b
%r
<<
7. rounds a number to the number of decimal points you choose
<
int()
round()
/=
8. Less than symbol
^
<
+=
&
9. reads just one line of a text file & keeps track of where in the file you're at
def
append()
n
file.readline()
10. A statement that breaks out of a loop.
break
argument variable
/
~
11. 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.
for
argument variable
#
Variables
12. End header line.
:
>
floating point number
open()
13. An operator to check whether two variables refer to the same object.
is
insert()
/
print
14. Symbol to subtract things from each other
>>
+
-
readline
15. Modulus operator. It's the remainder after division
%
or
int
*truncate
16. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
#
|
if
pass
17. divide AND assignment operator
int()
/=
def
|
18. multiply AND assignment operator
<=
%
:
*=
19. Symbol used to create comments
&
not in
+=
#
20. unction to read one line of a file
*
readline
while
*readline
21. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
return
print
&
:
22. square root
if
math.sqrt(a)
write
&
23. Prints a string to the screen which is converted using repr()
*=
%r
<=
input()
24. A logical operator which negates an expression so that it returns a value of True if the expression is false.
else
write
print()
not
25. This keyword in the body of a conditional - gives an alternative execution.
%d
print
print()
else
26. adds an item to a list
append()
elif (Else if)
#
>=
27. A logical operator which returns a value of True if either of the conditions is true.
or
>=
else
str()
28. add AND assignment operator
*readline
del
for
+=
29. Symbol to divide by the number to the right of the symbol
def
%
/
|
30. floor division AND assignment operator
return
//=
&
def
31. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
:
class
=
%s
32. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
readline
~
-=
open()
33. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
%
int
/
*write(stuff)
34. turns an object into a string
%s
str()
/=
-=
35. Prints a string to the screen which will be Unicode.
**=
%s
:
<<
36. floor division AND assignment operator
//=
break
readline
str()
37. exponentiation
a**b
n
print
insert()
38. ,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.
is not
()
append()
39. writes stuff to the file
int
close
<
file.write(stuff)
40. adds an item to a list
int()
append()
open()
#
41. modulus AND assignment operator
print
%=
math.sqrt(a)
open()
42. A keyword that does nothing but fill space to indicate code which will be written later.
pass
open()
%r
%
43. inserts an item inside a list at a certain index
>
%r
insert()
<
44. asks the user for a response and returns that response
#
input()
in
%s
45. Where the parameters go. A necessary punctuation after any function even if it's empty.
**=
format string
()
floating point number
46. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
a//b
in
def
47. 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.
break
in
close
a**b
48. turns an object into a string
read
input()
str()
==
49. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
+
~
/=
50. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
==
Variables
&