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 string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
round()
a**b
not
format string
2. Command to print to the screen
-
print
in
round()
3. Reads the contents of the file you can assign the result to a variable.
break
if
insert()
*read
4. Empties the file - watch out if you care about the file.
def
*truncate
+
<<
5. This keyword begins the simplest form of a conditional statement.
if
readline
elif (Else if)
else
6. Prints a string to the screen which is a signed decimal.
int()
%=
#
%d
7. turns an object into a string
=
close
n
str()
8. floor division AND assignment operator
//=
truncate
a//b
|
9. Less than or equal to symbol
>
<=
%s
truncate
10. absolute value
%=
len()
abs(a)
11. 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.
append()
<=
open()
in
12. Function to write something to a file
math.sqrt(a)
write
*readline
13. Adds something to a variable
%
<=
%r
=
14. A data type for representing numbers with fractional values.
floating point number
~
int()
|
15. Adds a new line character
%s
if
truncate
n
16. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
readline
for
%s
17. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
input()
and
>>
try
18. add AND assignment operator
+=
/=
open()
a//b
19. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
read
in
>=
file.seek()
20. Turns a line into a comment instead of executable code.
print
#
+
:
21. Function to close a file - it will not be able to be used again unless the file is opened.
close
del
/=
-
22. Symbol to multiply things
abs(a)
*read
*
floating point number
23. single line comment
while
>=
#
.py
24. 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
float
<<
.py
-=
25. Adds a new line character
round()
#
n
26. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
insert()
insert()
argument variable
27. asks the user for a response and returns that response
and
input()
*
+=
28. Function to read the contents of a file
read
>>
//=
print()
29. turns an object into a string
except
*readline
try
str()
30. A logical operator which requires two expressions to both be true.
#
%
and
print
31. This keyword in the body of a conditional allows chained conditionals.
>
elif (Else if)
*write(stuff)
insert()
32. 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
^
write
len()
%s
33. modulus AND assignment operator
a**b
%=
<
in
34. A statement that ends the current iteration of a loop but continues looping.
continue
=
*=
file.write(stuff)
35. A statement that breaks out of a loop.
break
=
int
>>
36. Symbol to divide by the number to the right of the symbol
/
~
a%b
>
37. A built-in function that converts its argument to a string.
a**b
str
*=
/
38. add AND assignment operator
-
>>
print
+=
39. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
=
<
abs(a)
and
40. adds an item to a list
%s
a%b
>
append()
41. Modulus operator. It's the remainder after division
%
and
+=
read
42. End header line.
**=
append()
:
-=
43. Reads just one line of a text file.
-
round()
insert()
*readline
44. Symbol to multiply things
print()
not in
*
#
45. A keyword that does nothing but fill space to indicate code which will be written later.
assignment
in
%d
pass
46. A built-in function that converts integers and strings to floating-point numbers.
^
float
<=
elif (Else if)
47. The keyword beginning a header that will create a loop.
~
=
for
round()
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.
/
:
for
49. Create a variable.
//=
=
+=
file.write(stuff)
50. modulo
len()
-
a**b
a%b