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. A built-in function that converts its argument to a string.
in
**=
str
open()
2. 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
>>
argv
3. modulus AND assignment operator
%d
>=
%=
and
4. divide AND assignment operator
<
/=
read
%d
5. Symbol to divide by the number to the right of the symbol
>
close
/
readline
6. add AND assignment operator
^
**=
a**b
+=
7. Symbol to divide by the number to the right of the symbol
#
.py
/
open()
8. 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.
continue
argument variable
<=
insert()
9. assignment operator
=
is
&
#
10. Adds something to a variable
=
elif (Else if)
file.write(stuff)
*write(stuff)
11. Argument variable
close
&
a%b
argv
12. Empties the file - watch out if you care about the file.
*truncate
math.sqrt(a)
%s
|
13. Argument variable
:
str()
argv
len()
14. Where the parameters go. A necessary punctuation after any function even if it's empty.
print()
argv
*truncate
()
15. asks the user for a response and returns that response
input()
readline
else
len()
16. empties the file
&
=
file.truncate()
input()
17. Symbol to multiply things
write
%=
*
len()
18. prints its parameter to the console
^
a**b
print()
close
19. returns the length of a string (number of characters)
%s
<=
-
len()
20. Function to write something to a file
write
float
=
insert()
21. exponent AND assignment operator
<<
**=
*read
a//b
22. Adds a new line character
+
n
readline
&
23. End header line.
floating point number
if
:
argv
24. Adds a new line character
|
n
()
*
25. Function to write something to a file
write
*=
-=
#
26. A statement that assigns a value to a variable.
continue
write
print()
assignment
27. adds an item to a list
append()
pass
else
def
28. This keyword begins a header for a body that repeats until the condition is no longer true.
file.truncate()
+=
break
while
29. This keyword in the body of a conditional allows chained conditionals.
elif (Else if)
print()
if
+=
30. Create a variable.
floating point number
truncate
^
=
31. sets the file's current position
file.seek()
~
Variables
%
32. Reads just one line of a text file.
format string
<<
int
*readline
33. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
for
class
readline
len()
34. floor division
argv
.py
*=
a//b
35. This keyword in the body of a conditional - gives an alternative execution.
a%b
readline
else
for
36. unction to read one line of a file
readline
not
try
*write(stuff)
37. Less than or equal to symbol
**=
argv
<=
is
38. exponentiation
int()
a**b
if
raise
39. Less than symbol
round()
-
/
<
40. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
=
-=
~
int()
41. A logical operator which negates an expression so that it returns a value of True if the expression is false.
not
argv
*=
*truncate
42. exponentiation
format string
a**b
%d
or
43. turns an object into an integer
<
pass
int()
.py
44. A logical operator which requires two expressions to both be true.
|
or
<<
and
45. A statement that displays a value on the screen.
%r
==
n
print
46. Reads the contents of the file you can assign the result to a variable.
return
.py
*read
round()
47. Symbol to add things together
%r
+
print
Variables
48. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.
read
close
print()
49. divide AND assignment operator
/=
except
==
50. This keyword begins the simplest form of a conditional statement.
*readline
is
-
if