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 keyword beginning a header that will create a new function.
.py
def
readline
%s
2. Less than symbol
<
int
+
in
3. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
append()
return
-=
|
4. Symbol to subtract things from each other
-
input()
>
*
5. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
<<
%s
*
~
6. The extension for Python scripts
.py
-=
in
str()
7. writes stuff to the file
>
n
file.write(stuff)
open()
8. square root
=
<=
print
math.sqrt(a)
9. Argument variable
argv
and
truncate
int
10. single line comment
len()
readline
#
%s
11. Symbol used to create comments
>
Variables
#
.py
12. A keyword that does nothing but fill space to indicate code which will be written later.
.py
len()
pass
13. modulo
/
return
in
a%b
14. deletes an item from a list
argument variable
#
del
<
15. returns the length of a string (number of characters)
len()
:
.py
math.sqrt(a)
16. A logical operator which returns a value of True if either of the conditions is true.
a**b
or
class
:
17. A statement that displays a value on the screen.
a**b
%d
()
print
18. rounds a number to the number of decimal points you choose
abs(a)
float
round()
>
19. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
file.seek()
len()
~
del
20. Symbol to add things together
+
elif (Else if)
else
>>
21. deletes an item from a list
append()
=
>=
del
22. An operator to check whether two variables refer to the same object.
()
is
a//b
:
23. sets the file's current position
def
round()
file.seek()
is
24. Function to read the contents of a file
str()
read
file.write(stuff)
abs(a)
25. 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
()
^
def
else
26. This keyword in the body of a conditional allows chained conditionals.
a%b
readline
elif (Else if)
a//b
27. Less than symbol
=
<
a//b
print
28. A logical operator which negates an expression so that it returns a value of True if the expression is false.
not
+
*read
del
29. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
abs(a)
elif (Else if)
print()
and
30. Greater than symbol
>
print
not
<=
31. Create a variable.
write
+
=
:
32. Prints a string to the screen which will be Unicode.
str()
%s
in
*read
33. reads just one line of a text file & keeps track of where in the file you're at
<<
math.sqrt(a)
else
file.readline()
34. asks the user for a response and returns that response
&
append()
input()
del
35. adds an item to a list
append()
a**b
%r
<
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
+=
print()
%=
^
37. Symbol to add things together
+
()
def
=
38. returns the length of a string (number of characters)
len()
a//b
=
file.seek()
39. Greater than or equal symbol.
>=
write
+
:
40. modulus AND assignment operator
%=
&
=
%d
41. Function to empty the contents of a file - no recovery is possible
print
for
truncate
if
42. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
|
break
int
argument variable
43. prints its parameter to the console
file.write(stuff)
str()
print()
>
44. Modulus operator. It's the remainder after division
close
not
%
%=
45. unction to read one line of a file
//=
readline
=
*truncate
46. Command to print to the screen
-=
%d
print
/=
47. Function to write something to a file
>=
write
%r
print
48. This statement exits a function. The remaining lines of the function are not executed.
int()
>=
not
return
49. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
//=
float
format string
Variables
50. Argument variable
argv
print()
str()
+
Can you answer 50 questions in 15 minutes?
Let me suggest you:
Browse all subjects
Browse all tests
Most popular tests
Major Subjects
Tests & Exams
AP
CLEP
DSST
GRE
SAT
GMAT
Certifications
CISSP go to https://www.isc2.org/
PMP
ITIL
RHCE
MCTS
More...
IT Skills
Android Programming
Data Modeling
Objective C Programming
Basic Python Programming
Adobe Illustrator
More...
Business Skills
Advertising Techniques
Business Accounting Basics
Business Strategy
Human Resource Management
Marketing Basics
More...
Soft Skills
Body Language
People Skills
Public Speaking
Persuasion
Job Hunting And Resumes
More...
Vocabulary
GRE Vocab
SAT Vocab
TOEFL Essential Vocab
Basic English Words For All
Global Words You Should Know
Business English
More...
Languages
AP German Vocab
AP Latin Vocab
SAT Subject Test: French
Italian Survival
Norwegian Survival
More...
Engineering
Audio Engineering
Computer Science Engineering
Aerospace Engineering
Chemical Engineering
Structural Engineering
More...
Health Sciences
Basic Nursing Skills
Health Science Language Fundamentals
Veterinary Technology Medical Language
Cardiology
Clinical Surgery
More...
English
Grammar Fundamentals
Literary And Rhetorical Vocab
Elements Of Style Vocab
Introduction To English Major
Complete Advanced Sentences
Literature
Homonyms
More...
Math
Algebra Formulas
Basic Arithmetic: Measurements
Metric Conversions
Geometric Properties
Important Math Facts
Number Sense Vocab
Business Math
More...
Other Major Subjects
Science
Economics
History
Law
Performing-arts
Cooking
Logic & Reasoning
Trivia
Browse all subjects
Browse all tests
Most popular tests