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. reads just one line of a text file & keeps track of where in the file you're at
==
break
file.readline()
Variables
2. assignment operator
file.readline()
=
#
<=
3. Function to open or read a file
math.sqrt(a)
open()
>=
int
4. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
else
/
|
print
5. This keyword begins a header for a body that repeats until the condition is no longer true.
=
=
append()
while
6. Greater than or equal symbol.
elif (Else if)
argv
len()
>=
7. turns an object into an integer
file.seek()
-=
int()
int
8. adds an item to a list
break
floating point number
print
append()
9. A logical operator which negates an expression so that it returns a value of True if the expression is false.
is
not
int()
<=
10. Less than or equal to symbol
assignment
float
<=
str()
11. The keyword beginning a header that will create a loop.
%s
for
close
&
12. asks the user for a response and returns that response
<
/
input()
not in
13. Symbol to divide by the number to the right of the symbol
math.sqrt(a)
/
~
>
14. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
not in
and
except
input()
15. 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.
open()
in
math.sqrt(a)
int()
16. deletes an item from a list
%r
del
>>
a//b
17. Prevents a runtime error from stopping the program.
|
open()
except
format string
18. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
int
try
^
and
19. The keyword beginning a header that will create a loop.
read
*=
for
<=
20. Function to close a file - it will not be able to be used again unless the file is opened.
readline
=
write
close
21. turns an object into a string
/=
str()
*=
raise
22. Prints a string to the screen which is a signed decimal.
%d
del
//=
^
23. This statement exits a function. The remaining lines of the function are not executed.
return
close
-
=
24. Create a variable.
=
input()
%=
elif (Else if)
25. This keyword begins the simplest form of a conditional statement.
while
/=
if
is not
26. Less than or equal to symbol
/=
del
.py
<=
27. A data type for representing numbers with fractional values.
-
abs(a)
|
floating point number
28. Less than symbol
<
&
/
%s
29. 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.
not in
-
|
/=
30. exponentiation
Variables
close
print
a**b
31. 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
~
del
~
32. A built-in function that converts integers and strings to floating-point numbers.
%r
float
file.truncate()
.py
33. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
elif (Else if)
==
continue
34. exponentiation
class
float
print
a**b
35. Function to write something to a file
n
write
while
<<
36. This keyword begins the simplest form of a conditional statement.
assignment
~
^
if
37. Modulus operator. It's the remainder after division
%
<
=
a//b
38. This statement causes an exception.
()
raise
int()
:
39. absolute value
abs(a)
else
.py
n
40. Symbol to multiply things
*
%d
abs(a)
len()
41. Less than symbol
<
*
input()
~
42. Function to write something to a file
&
//=
write
#
43. Adds a new line character
n
<
-
*=
44. subtract AND assignment operator
*=
-=
truncate
<<
45. This keyword in the body of a conditional allows chained conditionals.
for
len()
|
elif (Else if)
46. unction to read one line of a file
:
a%b
close
readline
47. square root
math.sqrt(a)
file.seek()
round()
round()
48. A statement that breaks out of a loop.
=
file.seek()
break
in
49. A logical operator which compares two operands and produces True if they are equal and False otherwise
%=
abs(a)
abs(a)
==
50. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
format string
#
insert()
break