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. exponent AND assignment operator
append()
Variables
**=
while
2. floor division
a//b
&
*=
&
3. single line comment
=
*truncate
#
def
4. 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
else
^
input()
>
5. modulus AND assignment operator
int()
close
%=
del
6. asks the user for a response and returns that response
input()
str()
print()
*
7. The keyword beginning a header that will create a new function.
=
floating point number
def
Variables
8. reads just one line of a text file & keeps track of where in the file you're at
a//b
math.sqrt(a)
file.readline()
9. This keyword begins the simplest form of a conditional statement.
is
a//b
except
if
10. Symbol to subtract things from each other
for
and
-
math.sqrt(a)
11. Prints a string to the screen which will be Unicode.
len()
+=
%s
if
12. modulus AND assignment operator
%=
argument variable
<=
*read
13. exponent AND assignment operator
*
truncate
**=
argv
14. 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
=
<<
del
is not
15. 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.
**=
if
not in
len()
16. Prevents a runtime error from stopping the program.
except
try
in
#
17. exponentiation
while
a**b
except
<
18. Modulus operator. It's the remainder after division
=
%
*
a**b
19. rounds a number to the number of decimal points you choose
~
>>
round()
break
20. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
>>
write
|
in
21. Prints a string to the screen which will be Unicode.
%s
//=
pass
+=
22. Prints a string to the screen which is a signed decimal.
%d
**=
def
=
23. Symbol to multiply things
not in
not
()
*
24. Function to close a file - it will not be able to be used again unless the file is opened.
print
close
is
del
25. The keyword beginning a header that will create a new function.
file.truncate()
def
=
except
26. Reads the contents of the file you can assign the result to a variable.
^
round()
*read
if
27. A statement that ends the current iteration of a loop but continues looping.
continue
~
len()
-
28. Adds something to a variable
/=
>>
=
n
29. Greater than or equal symbol.
for
^
>=
*read
30. A data type for representing numbers with fractional values.
>=
:
<=
floating point number
31. 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(stuff)
=
^
<=
32. Symbol to add things together
del
>=
return
+
33. Less than or equal to symbol
format string
str()
%=
<=
34. The keyword beginning a header that will create a loop.
else
+=
*readline
for
35. A built-in function that converts its argument to a string.
read
str
def
floating point number
36. The extension for Python scripts
^
raise
.py
*=
37. A statement that breaks out of a loop.
while
//=
break
is not
38. Less than symbol
file.seek()
<
except
>=
39. Symbol used to create comments
print
#
a**b
argv
40. absolute value
==
abs(a)
+
a//b
41. inserts an item inside a list at a certain index
>>
#
is
insert()
42. The keyword beginning a header that will create a loop.
==
file.truncate()
%s
for
43. Create a variable.
()
open()
print
=
44. ,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.
a%b
#
for
45. This keyword in the body of a conditional allows chained conditionals.
close
>>
int()
elif (Else if)
46. Argument variable
()
argv
close
47. Modulus operator. It's the remainder after division
else
^
%
file.truncate()
48. deletes an item from a list
<<
if
*
del
49. add AND assignment operator
write
+=
read
&
50. Symbol to multiply things
=
math.sqrt(a)
*
*=