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.
open()
*readline
<<
def
2. reads just one line of a text file & keeps track of where in the file you're at
insert()
*readline
file.readline()
%s
3. Adds a new line character
n
:
~
a//b
4. Greater than or equal symbol.
>=
write
and
append()
5. exponentiation
a**b
*truncate
=
int()
6. A keyword that does nothing but fill space to indicate code which will be written later.
is
file.truncate()
open()
pass
7. This keyword in the body of a conditional - gives an alternative execution.
else
del
Variables
/
8. absolute value
()
del
open()
abs(a)
9. A built-in function that converts integers and strings to floating-point numbers.
float
int
*=
<
10. This keyword begins a header for a body that repeats until the condition is no longer true.
while
n
str()
*read
11. sets the file's current position
>
=
truncate
file.seek()
12. 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.
a%b
>=
&
not in
13. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
&
str
()
|
14. Prints a string to the screen which is a signed decimal.
in
%d
for
>
15. modulo
a%b
print()
is not
elif (Else if)
16. A logical operator which returns a value of True if either of the conditions is true.
%=
write
or
int()
17. Command to print to the screen
readline
print
except
in
18. A data type for representing numbers with fractional values.
is
and
floating point number
%r
19. Symbol used to create comments
write
#
def
*write(stuff)
20. Modulus operator. It's the remainder after division
%
is not
^
%=
21. Modulus operator. It's the remainder after division
-=
abs(a)
%
file.seek()
22. Symbol to divide by the number to the right of the symbol
#
/
class
open()
23. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
&
argument variable
+=
24. A logical operator which negates an expression so that it returns a value of True if the expression is false.
not
==
print
input()
25. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
math.sqrt(a)
//=
Variables
**=
26. 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
^
file.seek()
>>
input()
27. turns an object into an integer
format string
*readline
int()
int
28. turns an object into a string
str
def
//=
str()
29. Function to close a file - it will not be able to be used again unless the file is opened.
#
-=
close
write
30. inserts an item inside a list at a certain index
|
print
file.truncate()
insert()
31. Less than symbol
+=
truncate
**=
<
32. Function to write something to a file
append()
continue
truncate
write
33. 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).
float
round()
except
is not
34. Greater than or equal symbol.
class
>=
^
break
35. returns the length of a string (number of characters)
=
append()
len()
*read
36. Prints a string to the screen which is a signed decimal.
+
%d
int()
()
37. A statement that ends the current iteration of a loop but continues looping.
continue
len()
input()
**=
38. This statement exits a function. The remaining lines of the function are not executed.
and
input()
%s
return
39. Adds something to a variable
=
>
del
<
40. empties the file
file.truncate()
=
del
+=
41. turns an object into an integer
abs(a)
int()
break
:
42. rounds a number to the number of decimal points you choose
read
math.sqrt(a)
%r
round()
43. This keyword begins the simplest form of a conditional statement.
def
-=
#
if
44. 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
a%b
if
open()
>>
45. This keyword in the body of a conditional allows chained conditionals.
elif (Else if)
del
|
=
46. assignment operator
==
**=
=
def
47. writes stuff to the file
#
<
readline
file.write(stuff)
48. Symbol to multiply things
<<
~
/=
*
49. Prevents a runtime error from stopping the program.
**=
str()
write
except
50. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
**=
math.sqrt(a)
and
str()