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. Command to print to the screen
argument variable
and
print
a**b
2. Modulus operator. It's the remainder after division
input()
*write(stuff)
&
%
3. A logical operator which compares two operands and produces True if they are equal and False otherwise
assignment
==
del
close
4. exponent AND assignment operator
**=
+
del
()
5. This statement exits a function. The remaining lines of the function are not executed.
%=
<=
and
return
6. Argument variable
pass
argv
input()
raise
7. Greater than or equal symbol.
<<
assignment
>
>=
8. This keyword begins the simplest form of a conditional statement.
truncate
>
if
argv
9. A data type for representing numbers with fractional values.
<<
floating point number
a//b
print()
10. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
abs(a)
append()
|
-=
11. single line comment
%s
del
#
>=
12. square root
argument variable
math.sqrt(a)
return
or
13. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
<
class
except
14. writes stuff to the file
()
file.write(stuff)
/=
a**b
15. This keyword begins the simplest form of a conditional statement.
a%b
if
a**b
()
16. Greater than symbol
>
int
float
~
17. Symbol to add things together
class
input()
+
/
18. floor division AND assignment operator
//=
append()
#
format string
19. 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.
not in
file.readline()
&
input()
20. Prints a string to the screen which is converted using repr()
=
%r
del
%=
21. 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.
*
in
+=
argument variable
22. Adds something to a variable
.py
a//b
#
=
23. This keyword in the body of a conditional allows chained conditionals.
input()
-
elif (Else if)
for
24. This keyword in the body of a conditional - gives an alternative execution.
#
<
//=
else
25. Symbol to multiply things
open()
:
*
-
26. Prints a string to the screen which is a signed decimal.
argument variable
=
floating point number
%d
27. A statement that ends the current iteration of a loop but continues looping.
print
continue
in
Variables
28. Prints a string to the screen which will be Unicode.
%s
int
-
==
29. turns an object into a string
str()
Variables
%s
class
30. Symbol to add things together
and
Variables
truncate
+
31. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
is
&
close
open()
32. Function to read the contents of a file
read
=
file.readline()
insert()
33. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
print
in
-
argv
34. Prints a string to the screen which is converted using repr()
raise
%r
Variables
in
35. Function to close a file - it will not be able to be used again unless the file is opened.
float
del
truncate
close
36. exponentiation
a**b
argument variable
else
a//b
37. Symbol used to create comments
-=
#
write
read
38. A built-in function that converts integers and strings to floating-point numbers.
a//b
assignment
float
a%b
39. Evaluates to false if the variables on either side of the operator point to the same object and true otherwise. x is not y - here is not results in 1 if id(x) is not equal to id(y).
input()
<<
is not
write
40. Modulus operator. It's the remainder after division
math.sqrt(a)
%
math.sqrt(a)
#
41. End header line.
>
#
:
>
42. End header line.
class
&
:
print()
43. assignment operator
=
&
()
:
44. floor division
Variables
a//b
break
if
45. modulo
|
a%b
close
round()
46. Function to open or read a file
file.truncate()
*=
open()
/=
47. prints its parameter to the console
del
round()
print()
+
48. floor division AND assignment operator
//=
*=
<=
is not
49. Command to print to the screen
print
del
except
a**b
50. subtract AND assignment operator
for
.py
append()
-=