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. Symbol to add things together
=
Variables
+
write
2. Where the parameters go. A necessary punctuation after any function even if it's empty.
or
%=
()
format string
3. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
==
file.truncate()
int
round()
4. Symbol to subtract things from each other
-=
#
-
=
5. writes stuff to the file
**=
argv
file.write(stuff)
try
6. empties the file
close
file.truncate()
/
%s
7. Prints a string to the screen which is a signed decimal.
|
//=
%d
()
8. turns an object into an integer
&
//=
int()
print
9. floor division AND assignment operator
truncate
<
//=
/=
10. single line comment
#
if
+=
~
11. rounds a number to the number of decimal points you choose
write
open()
round()
*read
12. Symbol to divide by the number to the right of the symbol
int()
/
def
print
13. This keyword begins a header for a body that repeats until the condition is no longer true.
while
elif (Else if)
float
len()
14. Reads the contents of the file you can assign the result to a variable.
*read
is
print()
-=
15. floor division AND assignment operator
:
if
//=
try
16. Adds a new line character
def
n
open()
write
17. assignment operator
=
/=
print
<=
18. Argument variable
a//b
=
argv
input()
19. 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
argv
%
=
20. add AND assignment operator
+=
print
-
<=
21. A statement that breaks out of a loop.
break
int()
write
%
22. A statement that assigns a value to a variable.
close
math.sqrt(a)
and
assignment
23. Function to read the contents of a file
~
return
argv
read
24. Function to write something to a file
%
/=
write
is
25. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
and
readline
len()
^
26. modulus AND assignment operator
%=
|
a//b
+=
27. 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.
del
%=
print()
not in
28. Greater than symbol
print()
>
file.readline()
a**b
29. Command to print to the screen
==
insert()
print
del
30. Greater than or equal symbol.
elif (Else if)
>=
a//b
float
31. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
and
try
math.sqrt(a)
Variables
32. The keyword beginning a header that will create a new function.
close
%
round()
def
33. floor division
input()
close
a//b
*=
34. deletes an item from a list
del
or
argv
35. multiply AND assignment operator
==
open()
*=
a**b
36. 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
^
int()
=
*=
37. Symbol to subtract things from each other
-
round()
n
<=
38. returns the length of a string (number of characters)
n
len()
del
else
39. Argument variable
:
argv
>
append()
40. Symbol used to create comments
%r
#
%r
floating point number
41. Function to open or read a file
*=
//=
open()
^
42. asks the user for a response and returns that response
>
for
round()
input()
43. turns an object into an integer
in
argv
int()
return
44. Modulus operator. It's the remainder after division
*=
+=
del
%
45. unction to read one line of a file
math.sqrt(a)
if
readline
*
46. Less than symbol
len()
>>
<
print()
47. This keyword in the body of a conditional - gives an alternative execution.
else
n
:
%=
48. This statement causes an exception.
else
%s
raise
def
49. A data type for representing numbers with fractional values.
abs(a)
str()
%=
floating point number
50. Symbol to multiply things
readline
*
not in
readline