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. The extension for Python scripts
#
|
*readline
.py
2. assignment operator
not in
=
|
%r
3. assignment operator
if
=
int()
*readline
4. returns the length of a string (number of characters)
^
str()
int
len()
5. Where the parameters go. A necessary punctuation after any function even if it's empty.
+
write
class
()
6. Function to write something to a file
&
n
write
%d
7. A statement that breaks out of a loop.
<<
in
assignment
break
8. Command to print to the screen
print
-
%=
|
9. Function to close a file - it will not be able to be used again unless the file is opened.
<=
#
close
>
10. Symbol to add things together
|
is not
+
%
11. 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
()
a//b
Variables
<<
12. Prints a string to the screen which will be Unicode.
%s
and
len()
+
13. Prints a string to the screen which is a signed decimal.
not in
%
%d
is
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
%s
float
<<
:
15. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
str()
write
-=
and
16. The keyword beginning a header that will create a loop.
%r
^
or
for
17. Prevents a runtime error from stopping the program.
:
-
except
/=
18. This statement exits a function. The remaining lines of the function are not executed.
open()
del
-=
return
19. Less than or equal to symbol
<=
a%b
#
**=
20. floor division AND assignment operator
len()
&
//=
21. ,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.
*read
//=
=
22. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
argv
>
&
*write(stuff)
23. A logical operator which returns a value of True if either of the conditions is true.
or
<=
|
()
24. Argument variable
%d
&
argv
readline
25. An operator to check whether two variables refer to the same object.
#
argument variable
=
is
26. Symbol to subtract things from each other
=
and
-
print
27. prints its parameter to the console
/=
print()
for
/
28. Prints a string to the screen which is a signed decimal.
%d
/=
insert()
del
29. Symbol to divide by the number to the right of the symbol
/
print
=
del
30. 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
continue
=
^
|
31. A statement that displays a value on the screen.
str
=
print
#
32. A built-in function that converts integers and strings to floating-point numbers.
<
/=
=
float
33. 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.
argument variable
%r
in
input()
34. Adds something to a variable
is
=
-=
format string
35. Modulus operator. It's the remainder after division
a**b
%
<=
str
36. A statement that assigns a value to a variable.
*readline
assignment
write
print
37. single line comment
def
write
#
38. This keyword in the body of a conditional - gives an alternative execution.
abs(a)
Variables
else
+
39. Symbol to add things together
+
<<
=
<
40. Function to close a file - it will not be able to be used again unless the file is opened.
readline
==
*read
close
41. Symbol used to create comments
#
**=
print()
*truncate
42. asks the user for a response and returns that response
input()
=
n
*=
43. unction to read one line of a file
math.sqrt(a)
%=
open()
readline
44. multiply AND assignment operator
-
close
def
*=
45. Greater than or equal symbol.
>=
*
except
or
46. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
float
int()
%
|
47. Function to read the contents of a file
read
append()
>>
math.sqrt(a)
48. floor division AND assignment operator
//=
raise
-=
Variables
49. This keyword in the body of a conditional - gives an alternative execution.
%s
else
continue
/
50. Command to print to the screen
*write(stuff)
a%b
+
print