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. End header line.
^
#
round()
:
2. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
#
and
abs(a)
%r
3. Greater than or equal symbol.
format string
write
len()
>=
4. reads just one line of a text file & keeps track of where in the file you're at
insert()
/=
#
file.readline()
5. A built-in function that converts integers and strings to floating-point numbers.
float
def
-
and
6. floor division
*=
%d
%s
a//b
7. asks the user for a response and returns that response
input()
round()
Variables
write
8. exponent AND assignment operator
insert()
**=
if
>>
9. deletes an item from a list
.py
%d
del
>>
10. turns an object into an integer
-
/=
~
int()
11. Symbol to divide by the number to the right of the symbol
&
/
input()
def
12. Less than symbol
a//b
<
%s
^
13. empties the file
.py
insert()
file.truncate()
continue
14. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
is not
~
elif (Else if)
/=
15. A statement that ends the current iteration of a loop but continues looping.
%s
<<
continue
^
16. Modulus operator. It's the remainder after division
/=
n
%
continue
17. Greater than symbol
str()
del
print
>
18. turns an object into a string
str()
open()
>=
except
19. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000
file.truncate()
~
<<
%=
20. deletes an item from a list
del
**=
if
a//b
21. exponent AND assignment operator
-
|
==
**=
22. multiply AND assignment operator
break
-=
*=
argument variable
23. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000
a%b
<<
**=
abs(a)
24. A logical operator which requires two expressions to both be true.
input()
and
Variables
=
25. Function to read the contents of a file
/=
int()
read
&
26. Function to close a file - it will not be able to be used again unless the file is opened.
if
readline
//=
close
27. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
/
=
is
28. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int
/
%r
|
29. absolute value
is
abs(a)
in
a%b
30. A logical operator which returns a value of True if either of the conditions is true.
insert()
()
print
or
31. prints its parameter to the console
print()
def
~
break
32. Adds something to a variable
%r
readline
print
=
33. This keyword begins the simplest form of a conditional statement.
if
close
%s
Variables
34. square root
math.sqrt(a)
int
else
in
35. Where the parameters go. A necessary punctuation after any function even if it's empty.
=
-
pass
()
36. Symbol to subtract things from each other
*readline
insert()
-
:
37. assignment operator
=
+=
close
()
38. adds an item to a list
append()
input()
a%b
/
39. Turns a line into a comment instead of executable code.
//=
or
#
and
40. Prints a string to the screen which will be Unicode.
%
%s
#
a//b
41. This keyword in the body of a conditional allows chained conditionals.
*readline
a**b
elif (Else if)
42. Less than or equal to symbol
<=
*
math.sqrt(a)
=
43. Prints a string to the screen which is converted using repr()
%
%r
+
append()
44. modulus AND assignment operator
%=
in
while
~
45. The keyword beginning a header that will create a new function.
abs(a)
def
-
46. The keyword beginning a header that will create a loop.
a**b
for
^
str()
47. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
abs(a)
Variables
del
**=
48. End header line.
argv
>>
:
del
49. 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.
/=
^
in
except
50. Command to print to the screen
<<
<<
print
file.truncate()