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).
is not
=
truncate
.py
2. subtract AND assignment operator
print()
else
-=
argv
3. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
/=
and
break
*read
4. Argument variable
<
elif (Else if)
/=
argv
5. Adds a new line character
a//b
n
=
file.write(stuff)
6. Function to open or read a file
open()
=
=
readline
7. unction to read one line of a file
float
>
readline
def
8. Modulus operator. It's the remainder after division
<
%
class
%s
9. Less than or equal to symbol
<=
file.seek()
format string
~
10. Greater than symbol
>
%=
.py
argv
11. rounds a number to the number of decimal points you choose
>
%d
round()
argv
12. End header line.
abs(a)
%d
:
str()
13. A statement that breaks out of a loop.
print
break
round()
append()
14. ,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.
.py
#
floating point number
15. Adds a new line character
a**b
*truncate
len()
n
16. 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
^
elif (Else if)
else
%=
17. Writes stuff to the file.
for
print
*write(stuff)
~
18. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
>
|
round()
abs(a)
19. prints its parameter to the console
insert()
print()
>>
%s
20. Less than or equal to symbol
floating point number
*
%r
<=
21. multiply AND assignment operator
append()
for
readline
*=
22. Reads the contents of the file you can assign the result to a variable.
else
*read
a**b
int
23. returns the length of a string (number of characters)
in
n
*=
len()
24. divide AND assignment operator
%=
print()
*
/=
25. asks the user for a response and returns that response
**=
open()
input()
in
26. Command to print to the screen
=
print
except
a%b
27. Greater than or equal symbol.
=
format string
>=
*write(stuff)
28. The keyword beginning a header that will create a loop.
~
for
int
in
29. This statement exits a function. The remaining lines of the function are not executed.
%=
%
class
return
30. This statement causes an exception.
Variables
if
+=
raise
31. Function to read the contents of a file
/=
read
%=
=
32. Symbol to subtract things from each other
argument variable
-
str
file.readline()
33. rounds a number to the number of decimal points you choose
round()
print
a//b
int
34. Symbol to divide by the number to the right of the symbol
/
abs(a)
%=
del
35. exponentiation
=
a**b
a%b
pass
36. Prints a string to the screen which is a signed decimal.
%d
return
:
/=
37. absolute value
abs(a)
elif (Else if)
-=
<
38. Greater than symbol
*read
else
if
>
39. adds an item to a list
append()
#
round()
a//b
40. turns an object into an integer
readline
else
for
int()
41. floor division AND assignment operator
close
>>
in
//=
42. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
continue
|
<
43. Command to print to the screen
%
print
a%b
<<
44. Function to empty the contents of a file - no recovery is possible
#
truncate
+
int()
45. Function to write something to a file
&
~
//=
write
46. Function to close a file - it will not be able to be used again unless the file is opened.
str
is
close
file.truncate()
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.
print()
//=
=
in
48. A logical operator which requires two expressions to both be true.
str()
del
and
=
49. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
%
append()
Variables
50. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
+=
try
in
a//b