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. Function to read the contents of a file
file.write(stuff)
for
#
read
2. Adds a new line character
#
n
&
else
3. asks the user for a response and returns that response
abs(a)
input()
<<
close
4. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
print
|
~
-
5. Symbol used to create comments
=
#
Variables
insert()
6. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
class
=
**=
print
7. empties the file
-
math.sqrt(a)
file.truncate()
elif (Else if)
8. 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).
is not
int()
*=
def
9. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
>=
file.truncate()
%r
10. Symbol to divide by the number to the right of the symbol
/
abs(a)
print
%r
11. Prevents a runtime error from stopping the program.
+
a%b
except
**=
12. Turns a line into a comment instead of executable code.
print()
a%b
#
int
13. A statement that assigns a value to a variable.
int()
*=
assignment
break
14. inserts an item inside a list at a certain index
file.readline()
=
insert()
str
15. This keyword begins the simplest form of a conditional statement.
#
|
if
+
16. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
<
&
print()
~
17. square root
pass
close
math.sqrt(a)
.py
18. Empties the file - watch out if you care about the file.
format string
round()
*truncate
==
19. Less than or equal to symbol
readline
if
<=
str()
20. Function to close a file - it will not be able to be used again unless the file is opened.
close
truncate
floating point number
round()
21. divide AND assignment operator
%r
/=
append()
else
22. square root
math.sqrt(a)
<
/=
%r
23. floor division AND assignment operator
int
==
//=
close
24. Adds something to a variable
=
math.sqrt(a)
while
print
25. The keyword beginning a header that will create a loop.
for
&
floating point number
insert()
26. Symbol to divide by the number to the right of the symbol
/
a//b
readline
truncate
27. deletes an item from a list
int
del
is
n
28. A logical operator which compares two operands and produces True if they are equal and False otherwise
elif (Else if)
==
format string
truncate
29. divide AND assignment operator
+=
print
*=
/=
30. A built-in function that converts integers and strings to floating-point numbers.
<
read
%
float
31. Function to write something to a file
input()
+=
write
open()
32. unction to read one line of a file
Variables
<=
readline
>=
33. A logical operator which requires two expressions to both be true.
del
and
*
>
34. sets the file's current position
/=
file.seek()
file.readline()
len()
35. A logical operator which negates an expression so that it returns a value of True if the expression is false.
not
+
int()
file.seek()
36. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
del
|
/=
37. The extension for Python scripts
in
floating point number
in
.py
38. This keyword begins the simplest form of a conditional statement.
append()
if
and
39. 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.
pass
argument variable
+
is
40. single line comment
/=
append()
#
float
41. adds an item to a list
else
//=
append()
and
42. prints its parameter to the console
write
else
<
print()
43. Prints a string to the screen which will be Unicode.
<
*
%s
//=
44. Function to read the contents of a file
read
int
elif (Else if)
if
45. modulo
input()
#
print()
a%b
46. modulo
+
+
a%b
*read
47. Function to write something to a file
>
read
write
*
48. assignment operator
open()
=
print
pass
49. Function to open or read a file
open()
round()
**=
&
50. Command to print to the screen
truncate
-=
print
len()
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