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 its parameter to the console
print()
~
round()
not in
2. exponent AND assignment operator
*truncate
=
**=
abs(a)
3. Function to close a file - it will not be able to be used again unless the file is opened.
str()
close
if
in
4. floor division
*read
abs(a)
<
a//b
5. writes stuff to the file
file.write(stuff)
=
abs(a)
a//b
6. A built-in function that converts integers and strings to floating-point numbers.
float
len()
return
del
7. 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).
pass
is not
def
+=
8. Symbol to multiply things
a**b
str()
*
-=
9. rounds a number to the number of decimal points you choose
Variables
len()
read
round()
10. Symbol to add things together
+
+=
and
int
11. assignment operator
argument variable
|
=
-
12. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
file.readline()
/=
.py
13. Function to open or read a file
and
def
open()
file.seek()
14. Greater than symbol
:
>
Variables
or
15. square root
=
not
math.sqrt(a)
&
16. exponentiation
>
a**b
:
**=
17. turns an object into a string
str()
a//b
float
truncate
18. A statement that assigns a value to a variable.
<<
*
assignment
readline
19. 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
close
^
math.sqrt(a)
str
20. reads just one line of a text file & keeps track of where in the file you're at
argv
is not
%s
file.readline()
21. The extension for Python scripts
a//b
*=
%=
.py
22. divide AND assignment operator
=
*
a**b
/=
23. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
%=
file.seek()
%r
24. Greater than symbol
>
str
>>
write
25. Writes stuff to the file.
try
<=
*write(stuff)
#
26. multiply AND assignment operator
*=
len()
<<
a//b
27. ,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.
class
%s
del
28. asks the user for a response and returns that response
input()
%r
*=
len()
29. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
%r
|
~
30. A logical operator which negates an expression so that it returns a value of True if the expression is false.
*
not
int()
==
31. A data type for representing numbers with fractional values.
not
file.write(stuff)
floating point number
/
32. Symbol to multiply things
round()
*
int
#
33. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
%
~
file.readline()
>
34. Prints a string to the screen which is a signed decimal.
try
%d
argv
^
35. Less than or equal to symbol
<=
|
*=
argv
36. modulo
*=
write
.py
a%b
37. add AND assignment operator
round()
input()
()
+=
38. Create a variable.
=
&
#
is
39. inserts an item inside a list at a certain index
break
-=
insert()
~
40. Command to print to the screen
**=
#
print
#
41. Symbol to subtract things from each other
-
str()
abs(a)
42. modulus AND assignment operator
=
del
>=
%=
43. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
del
and
open()
#
44. sets the file's current position
file.seek()
*
in
math.sqrt(a)
45. deletes an item from a list
a**b
del
continue
str()
46. adds an item to a list
append()
print
~
.py
47. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
pass
n
str()
format string
48. turns an object into a string
try
truncate
except
str()
49. Function to open or read a file
print()
.py
*write(stuff)
open()
50. Prints a string to the screen which will be Unicode.
n
==
not in
%s