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. turns an object into a string
file.readline()
input()
str()
-=
2. An operator to check whether two variables refer to the same object.
argv
is
#
()
3. This keyword in the body of a conditional allows chained conditionals.
open()
for
elif (Else if)
insert()
4. Function to write something to a file
<=
write
truncate
>
5. modulo
a%b
math.sqrt(a)
>
**=
6. The keyword beginning a header that will create a loop.
read
%d
for
def
7. absolute value
abs(a)
*write(stuff)
len()
math.sqrt(a)
8. exponentiation
>>
a**b
=
//=
9. assignment operator
<=
=
read
class
10. add AND assignment operator
else
+=
%r
#
11. Greater than symbol
%
//=
else
>
12. Prints a string to the screen which is converted using repr()
close
/
%r
+
13. modulo
>
except
a%b
write
14. subtract AND assignment operator
|
<=
file.readline()
-=
15. Adds something to a variable
file.truncate()
=
file.write(stuff)
math.sqrt(a)
16. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
file.readline()
^
close
17. Greater than or equal symbol.
+=
in
float
>=
18. modulus AND assignment operator
#
*readline
%=
write
19. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
math.sqrt(a)
print()
Variables
argv
20. prints its parameter to the console
print()
truncate
>=
input()
21. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
readline
=
len()
22. Adds a new line character
^
%s
n
def
23. prints its parameter to the console
+=
-=
print()
int()
24. A statement that displays a value on the screen.
-=
float
print
open()
25. 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
<<
#
>>
#
26. A built-in function that converts integers and strings to floating-point numbers.
while
<<
a//b
float
27. This keyword begins the simplest form of a conditional statement.
-
**=
if
<
28. Prints a string to the screen which will be Unicode.
*write(stuff)
|
read
%s
29. End header line.
:
/
close
#
30. The keyword beginning a header that will create a new function.
def
while
a//b
pass
31. The extension for Python scripts
*readline
close
print()
.py
32. This keyword begins the simplest form of a conditional statement.
*=
if
~
%=
33. single line comment
is
#
//=
*write(stuff)
34. deletes an item from a list
math.sqrt(a)
a**b
print
del
35. Turns a line into a comment instead of executable code.
#
n
%d
a**b
36. Function to empty the contents of a file - no recovery is possible
truncate
|
else
abs(a)
37. inserts an item inside a list at a certain index
in
for
insert()
<=
38. turns an object into an integer
()
int()
*
#
39. 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
return
^
#
>
40. This keyword in the body of a conditional - gives an alternative execution.
&
else
%d
-=
41. writes stuff to the file
return
file.write(stuff)
str
/=
42. Argument variable
argv
else
>>
is not
43. 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
*=
math.sqrt(a)
%
44. Function to close a file - it will not be able to be used again unless the file is opened.
~
close
*
^
45. Reads just one line of a text file.
file.write(stuff)
*readline
def
argv
46. Prints a string to the screen which is a signed decimal.
%d
len()
while
&
47. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
while
format string
else
-=
48. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
file.readline()
/
&
elif (Else if)
49. deletes an item from a list
del
==
a//b
not in
50. Reads the contents of the file you can assign the result to a variable.
else
*read
%s
print
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