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. asks the user for a response and returns that response
>>
input()
open()
print()
2. The keyword beginning a header that will create a loop.
%=
abs(a)
for
write
3. modulo
close
a%b
float
a**b
4. Adds something to a variable
**=
/
a//b
=
5. Command to print to the screen
=
a**b
float
print
6. Function to empty the contents of a file - no recovery is possible
truncate
in
*
-=
7. Function to open or read a file
round()
open()
#
a//b
8. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
print
str()
==
9. 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
<=
>>
=
round()
10. ,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.
float
def
>>
11. 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.
int
()
//=
in
12. 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
<=
^
read
/
13. returns the length of a string (number of characters)
len()
<<
%s
int
14. Greater than symbol
round()
file.readline()
print
>
15. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
int
abs(a)
class
~
16. Argument variable
Variables
argv
raise
if
17. Less than symbol
>>
def
<
append()
18. 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
<<
readline
del
assignment
19. modulus AND assignment operator
file.readline()
write
%=
a//b
20. Function to empty the contents of a file - no recovery is possible
except
truncate
.py
del
21. A logical operator which negates an expression so that it returns a value of True if the expression is false.
<=
not
=
==
22. 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.
argument variable
read
raise
append()
23. absolute value
input()
input()
=
abs(a)
24. Where the parameters go. A necessary punctuation after any function even if it's empty.
return
a//b
input()
()
25. Less than or equal to symbol
round()
<=
<
int()
26. This keyword in the body of a conditional - gives an alternative execution.
%
else
write
=
27. A built-in function that converts its argument to a string.
str
%s
elif (Else if)
len()
28. End header line.
read
:
*read
except
29. This keyword in the body of a conditional - gives an alternative execution.
/=
else
return
*
30. Function to write something to a file
input()
truncate
a%b
write
31. Function to read the contents of a file
==
a%b
str()
read
32. Symbol used to create comments
#
floating point number
file.seek()
str()
33. A built-in function that converts integers and strings to floating-point numbers.
()
+=
file.write(stuff)
float
34. This keyword begins the simplest form of a conditional statement.
if
len()
append()
~
35. add AND assignment operator
del
<
open()
+=
36. A logical operator which requires two expressions to both be true.
()
**=
%r
and
37. This keyword in the body of a conditional allows chained conditionals.
while
int()
*readline
elif (Else if)
38. adds an item to a list
argument variable
file.readline()
len()
append()
39. Prints a string to the screen which will be Unicode.
%s
or
+=
continue
40. assignment operator
input()
insert()
=
a%b
41. turns an object into a string
<
str()
>
.py
42. Modulus operator. It's the remainder after division
**=
str()
close
%
43. inserts an item inside a list at a certain index
insert()
argument variable
^
>>
44. A logical operator which compares two operands and produces True if they are equal and False otherwise
print
==
del
if
45. exponent AND assignment operator
floating point number
a//b
**=
=
46. Greater than symbol
==
>
Variables
is
47. deletes an item from a list
return
input()
del
is
48. turns an object into an integer
while
int()
except
%
49. subtract AND assignment operator
=
#
/
-=
50. Symbol used to create comments
#
<
continue
format string