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. Prints a string to the screen which is a signed decimal.
break
insert()
truncate
%d
2. End header line.
:
*
file.truncate()
format string
3. Function to read the contents of a file
read
str
()
append()
4. Reads just one line of a text file.
*readline
%d
=
%s
5. returns the length of a string (number of characters)
continue
=
int()
len()
6. Symbol to divide by the number to the right of the symbol
insert()
=
read
/
7. deletes an item from a list
~
del
is
floating point number
8. Symbol used to create comments
is
#
&
float
9. A logical operator which compares two operands and produces True if they are equal and False otherwise
=
raise
==
len()
10. subtract AND assignment operator
>
print
not
-=
11. A statement that displays a value on the screen.
*readline
print
open()
for
12. Symbol to multiply things
a**b
*
<<
>
13. Modulus operator. It's the remainder after division
%
<<
argument variable
()
14. This keyword begins a header for a body that repeats until the condition is no longer true.
<=
^
while
truncate
15. Where the parameters go. A necessary punctuation after any function even if it's empty.
==
<<
/
()
16. This keyword begins the simplest form of a conditional statement.
.py
-=
if
math.sqrt(a)
17. writes stuff to the file
<=
del
:
file.write(stuff)
18. Symbol to subtract things from each other
except
>
while
-
19. Symbol to subtract things from each other
%s
==
pass
-
20. adds an item to a list
append()
=
**=
print
21. absolute value
abs(a)
file.seek()
.py
write
22. Writes stuff to the file.
+
or
*write(stuff)
()
23. An operator that removes a value from a list.
//=
>=
a%b
del
24. A logical operator which requires two expressions to both be true.
*
file.truncate()
and
a//b
25. This statement exits a function. The remaining lines of the function are not executed.
=
return
&
^
26. Greater than or equal symbol.
<=
-=
/
>=
27. divide AND assignment operator
print
<<
*write(stuff)
/=
28. deletes an item from a list
<<
for
a**b
del
29. modulus AND assignment operator
and
argv
%=
==
30. This keyword in the body of a conditional - gives an alternative execution.
else
()
=
+=
31. reads just one line of a text file & keeps track of where in the file you're at
open()
:
file.readline()
break
32. Prints a string to the screen which is converted using repr()
%r
.py
class
print
33. Adds a new line character
<
%s
-=
n
34. Function to open or read a file
open()
file.write(stuff)
write
a%b
35. floor division AND assignment operator
+
**=
>=
//=
36. exponentiation
<=
*truncate
str
a**b
37. Empties the file - watch out if you care about the file.
**=
a**b
del
*truncate
38. Adds a new line character
in
if
n
round()
39. 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.
file.readline()
close
in
not in
40. This statement causes an exception.
abs(a)
<
raise
return
41. Function to close a file - it will not be able to be used again unless the file is opened.
str()
read
file.write(stuff)
close
42. modulo
a%b
=
>=
#
43. sets the file's current position
file.seek()
in
is not
in
44. Function to close a file - it will not be able to be used again unless the file is opened.
+=
else
close
while
45. Greater than or equal symbol.
>=
if
and
46. unction to read one line of a file
readline
-=
()
%d
47. turns an object into a string
and
argv
str()
def
48. Argument variable
str()
float
else
argv
49. empties the file
/=
file.truncate()
Variables
raise
50. Create a variable.
close
&
=
/=