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. This statement causes an exception.
raise
&
math.sqrt(a)
+=
2. Writes stuff to the file.
*write(stuff)
n
==
a//b
3. A statement that assigns a value to a variable.
not
>=
write
assignment
4. Symbol to divide by the number to the right of the symbol
//=
is not
/
if
5. floor division AND assignment operator
//=
abs(a)
file.seek()
=
6. Greater than symbol
*readline
>
int()
round()
7. prints its parameter to the console
append()
file.write(stuff)
print()
%
8. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
-=
argv
math.sqrt(a)
9. This statement exits a function. The remaining lines of the function are not executed.
for
file.truncate()
%s
return
10. Symbol to add things together
math.sqrt(a)
%s
close
+
11. Symbol to subtract things from each other
-
%=
>>
=
12. divide AND assignment operator
/=
|
not in
and
13. add AND assignment operator
not
+=
input()
-
14. Adds something to a variable
<<
=
+=
/
15. The keyword beginning a header that will create a new function.
and
def
for
abs(a)
16. returns the length of a string (number of characters)
readline
abs(a)
len()
file.truncate()
17. floor division
+=
a//b
%s
a**b
18. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
append()
in
>
+=
19. exponentiation
str
else
int()
a**b
20. Prints a string to the screen which will be Unicode.
len()
-=
-
%s
21. absolute value
abs(a)
write
truncate
-
22. Greater than symbol
<
^
>
=
23. Function to write something to a file
#
write
close
argv
24. unction to read one line of a file
//=
readline
=
#
25. Create a variable.
raise
file.write(stuff)
=
close
26. exponent AND assignment operator
**=
&
:
append()
27. 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
>>
close
file.truncate()
print()
28. Less than symbol
+
>>
<
#
29. Where the parameters go. A necessary punctuation after any function even if it's empty.
|
()
%
readline
30. A keyword that does nothing but fill space to indicate code which will be written later.
print
#
pass
file.write(stuff)
31. inserts an item inside a list at a certain index
*read
insert()
>>
n
32. Symbol to divide by the number to the right of the symbol
argument variable
int()
/
+=
33. Function to open or read a file
float
open()
**=
file.readline()
34. Greater than or equal symbol.
>>
>=
*write(stuff)
<
35. Greater than or equal symbol.
=
>=
()
int()
36. turns an object into an integer
else
break
int()
&
37. adds an item to a list
input()
print
append()
open()
38. absolute value
~
<=
abs(a)
except
39. exponent AND assignment operator
**=
append()
format string
a%b
40. Modulus operator. It's the remainder after division
in
if
%
def
41. Adds something to a variable
n
if
a%b
=
42. Create a variable.
=
<=
len()
print
43. adds an item to a list
append()
close
%=
%d
44. turns an object into a string
*read
str()
and
len()
45. 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.
in
=
insert()
del
46. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
>>
~
&
47. Symbol to multiply things
format string
==
*
#
48. A data type for representing numbers with fractional values.
>
write
*readline
floating point number
49. floor division AND assignment operator
%s
()
//=
def
50. single line comment
def
write
#
if