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 keyword in the body of a conditional allows chained conditionals.
%
elif (Else if)
close
pass
2. Adds something to a variable
append()
print
=
*read
3. empties the file
()
file.truncate()
continue
#
4. absolute value
<
-
abs(a)
elif (Else if)
5. Less than or equal to symbol
<=
>=
file.write(stuff)
*truncate
6. This keyword in the body of a conditional - gives an alternative execution.
open()
%r
-
else
7. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
/
|
truncate
continue
8. A data type for representing numbers with fractional values.
=
<=
floating point number
>=
9. asks the user for a response and returns that response
>>
input()
round()
return
10. square root
math.sqrt(a)
break
abs(a)
&
11. Argument variable
*=
argv
elif (Else if)
len()
12. Empties the file - watch out if you care about the file.
/
argv
*truncate
break
13. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
write
%
<<
format string
14. Symbol to add things together
int()
+
%s
not in
15. This keyword begins the simplest form of a conditional statement.
except
>>
if
%=
16. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
else
.py
read
17. The keyword beginning a header that will create a loop.
^
~
for
argv
18. Symbol to subtract things from each other
print
-
=
pass
19. returns the length of a string (number of characters)
len()
input()
/
<
20. subtract AND assignment operator
str
#
.py
-=
21. 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
^
-
a%b
del
22. inserts an item inside a list at a certain index
=
insert()
==
input()
23. End header line.
round()
int()
assignment
:
24. divide AND assignment operator
%
<
open()
/=
25. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
<
not
26. 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.
insert()
argument variable
+=
**=
27. exponent AND assignment operator
abs(a)
*read
**=
28. A built-in function that converts its argument to a string.
%r
=
str
read
29. Symbol to multiply things
/=
=
*
raise
30. prints its parameter to the console
print()
a%b
+=
floating point number
31. End header line.
*=
or
:
%s
32. An operator to check whether two variables refer to the same object.
%d
str()
is
print
33. Function to empty the contents of a file - no recovery is possible
argv
truncate
>>
=
34. Prints a string to the screen which will be Unicode.
**=
file.write(stuff)
%s
>>
35. Greater than symbol
>
**=
**=
read
36. A statement that ends the current iteration of a loop but continues looping.
continue
~
|
*
37. Modulus operator. It's the remainder after division
close
if
%
+
38. deletes an item from a list
close
del
#
return
39. This keyword begins the simplest form of a conditional statement.
for
>=
if
>
40. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
str()
a**b
str()
41. Prints a string to the screen which is a signed decimal.
del
^
%d
&
42. Create a variable.
%=
del
=
int()
43. turns an object into a string
int()
*write(stuff)
str()
write
44. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
write
|
a%b
*
45. Function to open or read a file
round()
a**b
open()
else
46. An operator that removes a value from a list.
a**b
del
read
^
47. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
abs(a)
class
Variables
insert()
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.
a//b
len()
<=
49. Symbol used to create comments
=
pass
=
#
50. Writes stuff to the file.
%
readline
**=
*write(stuff)