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 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
append()
==
continue
2. add AND assignment operator
argv
*
+=
%
3. The keyword beginning a header that will create a loop.
for
argv
<
==
4. asks the user for a response and returns that response
//=
n
print()
input()
5. Greater than symbol
=
*=
>
a//b
6. Symbol to add things together
=
^
+
except
7. 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
not in
8. multiply AND assignment operator
-=
raise
*=
%=
9. asks the user for a response and returns that response
str()
input()
argument variable
a//b
10. modulus AND assignment operator
append()
try
%=
()
11. ,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.
*truncate
<
%
12. prints its parameter to the console
print()
%d
int()
while
13. empties the file
except
print()
|
file.truncate()
14. turns an object into a string
abs(a)
str()
==
&
15. Adds a new line character
/=
n
is not
readline
16. Argument variable
%s
write
print
argv
17. An operator that removes a value from a list.
+=
#
del
%s
18. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
print
int
del
open()
19. This statement causes an exception.
%r
=
raise
<
20. Prevents a runtime error from stopping the program.
*=
>
except
file.write(stuff)
21. subtract AND assignment operator
-=
+
open()
round()
22. This keyword begins a header for a body that repeats until the condition is no longer true.
while
or
close
>
23. Prints a string to the screen which is a signed decimal.
abs(a)
print()
&
%d
24. The keyword beginning a header that will create a new function.
in
*truncate
=
def
25. Symbol to subtract things from each other
*
-
print
in
26. Prints a string to the screen which will be Unicode.
-=
%s
>
*
27. Function to write something to a file
write
+=
%
open()
28. A statement that ends the current iteration of a loop but continues looping.
-
%
break
continue
29. assignment operator
=
or
<
int()
30. 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
def
readline
>>
str()
31. modulo
a%b
def
abs(a)
raise
32. absolute value
+
n
file.readline()
abs(a)
33. Prints a string to the screen which is converted using repr()
n
%r
a%b
input()
34. The extension for Python scripts
//=
try
+
.py
35. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
class
or
str
del
36. 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
argv
.py
if
<<
37. End header line.
()
a//b
**=
:
38. Function to open or read a file
argv
open()
*read
Variables
39. inserts an item inside a list at a certain index
Variables
%s
insert()
|
40. Symbol to multiply things
=
abs(a)
()
*
41. adds an item to a list
=
append()
assignment
<
42. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
==
append()
>=
and
43. Where the parameters go. A necessary punctuation after any function even if it's empty.
%r
>
()
print
44. This keyword begins the simplest form of a conditional statement.
**=
print()
if
%r
45. Symbol used to create comments
*read
:
#
46. reads just one line of a text file & keeps track of where in the file you're at
-=
file.readline()
:
not
47. deletes an item from a list
.py
del
open()
%s
48. This keyword in the body of a conditional allows chained conditionals.
+=
is not
elif (Else if)
int
49. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
*=
open()
n
50. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
pass
|
/
+=
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