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. Command to print to the screen
<
append()
print
float
2. add AND assignment operator
*=
read
len()
+=
3. modulo
a%b
break
^
a//b
4. inserts an item inside a list at a certain index
insert()
=
del
>
5. A logical operator which compares two operands and produces True if they are equal and False otherwise
del
math.sqrt(a)
==
and
6. A keyword that does nothing but fill space to indicate code which will be written later.
argv
pass
=
7. square root
math.sqrt(a)
append()
input()
assignment
8. exponent AND assignment operator
//=
-=
**=
%=
9. A statement that breaks out of a loop.
file.readline()
*readline
break
print()
10. This keyword begins the simplest form of a conditional statement.
write
-
open()
if
11. Prints a string to the screen which is a signed decimal.
~
%d
and
input()
12. unction to read one line of a file
truncate
>
n
readline
13. floor division
a//b
file.write(stuff)
Variables
raise
14. square root
=
#
argument variable
math.sqrt(a)
15. Prints a string to the screen which will be Unicode.
-
%s
argv
16. 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.
n
argument variable
<=
a//b
17. Where the parameters go. A necessary punctuation after any function even if it's empty.
>=
()
str()
abs(a)
18. A logical operator which requires two expressions to both be true.
round()
int()
%d
and
19. Prints a string to the screen which will be Unicode.
%s
/
a%b
-
20. rounds a number to the number of decimal points you choose
append()
%d
elif (Else if)
round()
21. A logical operator which returns a value of True if either of the conditions is true.
int
file.write(stuff)
or
math.sqrt(a)
22. Writes stuff to the file.
*
*write(stuff)
-=
for
23. Turns a line into a comment instead of executable code.
#
while
%r
math.sqrt(a)
24. Function to close a file - it will not be able to be used again unless the file is opened.
^
input()
abs(a)
close
25. Greater than or equal symbol.
:
abs(a)
+
>=
26. empties the file
abs(a)
math.sqrt(a)
file.truncate()
and
27. Symbol to subtract things from each other
insert()
str()
-
else
28. Less than or equal to symbol
truncate
<=
a**b
open()
29. adds an item to a list
else
in
>>
append()
30. A built-in function that converts its argument to a string.
Variables
a**b
str
for
31. floor division
a//b
pass
()
#
32. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
.py
file.write(stuff)
~
=
33. Prints a string to the screen which is a signed decimal.
truncate
try
-=
%d
34. Adds something to a variable
argv
%d
=
*
35. exponentiation
math.sqrt(a)
~
in
a**b
36. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
=
~
int
a**b
37. modulus AND assignment operator
%=
*
>=
n
38. A statement that assigns a value to a variable.
=
if
assignment
#
39. A data type for representing numbers with fractional values.
floating point number
*readline
>
**=
40. exponent AND assignment operator
*truncate
**=
>=
a**b
41. Function to open or read a file
def
str()
open()
argv
42. turns an object into a string
str()
/
int()
=
43. Function to empty the contents of a file - no recovery is possible
truncate
argv
**=
//=
44. Greater than symbol
print
>
else
*
45. An operator to check whether two variables refer to the same object.
and
is
>>
=
46. prints its parameter to the console
print()
not in
def
+
47. Symbol to subtract things from each other
print
-
**=
len()
48. asks the user for a response and returns that response
print()
insert()
input()
assignment
49. divide AND assignment operator
elif (Else if)
a**b
/=
()
50. assignment operator
floating point number
>
()
=