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. Adds a new line character
()
else
n
not
2. assignment operator
=
print
a%b
readline
3. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.
%s
not in
class
str()
4. rounds a number to the number of decimal points you choose
open()
%s
|
round()
5. The keyword beginning a header that will create a loop.
for
file.readline()
=
input()
6. Symbol used to create comments
a//b
#
if
open()
7. A logical operator which requires two expressions to both be true.
and
except
#
%d
8. A statement that ends the current iteration of a loop but continues looping.
del
str
continue
%r
9. Function to write something to a file
else
>
+=
write
10. Symbol to multiply things
readline
#
%=
*
11. Function to write something to a file
write
#
*
len()
12. Argument variable
pass
argv
continue
%r
13. Prints a string to the screen which will be Unicode.
%s
write
open()
file.truncate()
14. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
break
close
.py
15. This keyword begins a header for a body that repeats until the condition is no longer true.
if
int()
while
int()
16. multiply AND assignment operator
assignment
.py
<=
*=
17. exponent AND assignment operator
int()
**=
%r
18. subtract AND assignment operator
insert()
-=
-
=
19. Symbol to add things together
open()
//=
+
.py
20. Prints a string to the screen which is a signed decimal.
%d
==
.py
int()
21. Argument variable
and
file.readline()
//=
argv
22. Function to empty the contents of a file - no recovery is possible
~
truncate
readline
int()
23. Greater than symbol
math.sqrt(a)
/
readline
>
24. returns the length of a string (number of characters)
len()
def
>
in
25. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
^
readline
class
<<
26. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
round()
in
=
&
27. 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
*
argv
^
%r
28. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
Variables
a//b
~
=
29. divide AND assignment operator
%d
or
str()
/=
30. Less than symbol
#
int()
<
print
31. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
print
%s
*
format string
32. A keyword that does nothing but fill space to indicate code which will be written later.
Variables
pass
float
is not
33. reads just one line of a text file & keeps track of where in the file you're at
*read
file.write(stuff)
file.readline()
close
34. 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
>>
-
append()
n
35. Prints a string to the screen which is converted using repr()
for
/=
write
%r
36. End header line.
:
write
def
in
37. 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.
argument variable
~
:
return
38. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
%
in
del
|
39. A statement that breaks out of a loop.
*=
int
math.sqrt(a)
break
40. Symbol to divide by the number to the right of the symbol
//=
del
/
is not
41. A data type for representing numbers with fractional values.
abs(a)
*write(stuff)
while
floating point number
42. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
//=
|
%=
()
43. Adds something to a variable
&
~
=
print
44. Command to print to the screen
print
del
//=
read
45. A logical operator which negates an expression so that it returns a value of True if the expression is false.
^
argv
not
truncate
46. 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.
def
in
//=
Variables
47. floor division
except
*
<
a//b
48. A logical operator which compares two operands and produces True if they are equal and False otherwise
argv
==
>
+
49. Modulus operator. It's the remainder after division
()
#
int
%
50. Symbol to multiply things
print
*
Variables
str()