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. reads just one line of a text file & keeps track of where in the file you're at
a//b
*
argv
file.readline()
2. turns an object into an integer
in
int()
argv
<
3. A data type for representing numbers with fractional values.
>=
floating point number
write
write
4. This statement exits a function. The remaining lines of the function are not executed.
**=
*=
return
Variables
5. The extension for Python scripts
*write(stuff)
.py
a//b
#
6. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
truncate
and
~
=
7. square root
or
math.sqrt(a)
str
=
8. A statement that breaks out of a loop.
break
print
<
str
9. A statement that assigns a value to a variable.
break
+
assignment
==
10. Less than or equal to symbol
%
//=
pass
<=
11. Symbol to subtract things from each other
==
-
>=
~
12. turns an object into an integer
**=
argument variable
math.sqrt(a)
int()
13. Prints a string to the screen which will be Unicode.
a%b
%s
read
<=
14. exponentiation
+=
a**b
//=
print()
15. 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
Variables
<<
*truncate
16. Symbol to multiply things
()
=
*
truncate
17. Reads the contents of the file you can assign the result to a variable.
while
*read
+
print
18. Greater than symbol
//=
continue
+=
>
19. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
**=
if
|
20. rounds a number to the number of decimal points you choose
math.sqrt(a)
float
return
round()
21. deletes an item from a list
if
del
int()
**=
22. floor division AND assignment operator
abs(a)
class
//=
-=
23. exponent AND assignment operator
**=
file.write(stuff)
print()
>=
24. modulo
==
#
a%b
file.readline()
25. Prints a string to the screen which is a signed decimal.
insert()
str()
a%b
%d
26. A built-in function that converts its argument to a string.
str
format string
not
<
27. A statement that ends the current iteration of a loop but continues looping.
len()
continue
*readline
&
28. Symbol used to create comments
#
if
is
~
29. add AND assignment operator
>
+=
-=
print
30. rounds a number to the number of decimal points you choose
abs(a)
~
round()
truncate
31. Function to empty the contents of a file - no recovery is possible
=
<=
truncate
str
32. Prints a string to the screen which is converted using repr()
%r
%=
()
assignment
33. empties the file
math.sqrt(a)
file.readline()
n
file.truncate()
34. inserts an item inside a list at a certain index
%d
*truncate
&
insert()
35. Function to write something to a file
=
<
break
write
36. Function to open or read a file
open()
a%b
=
a//b
37. single line comment
abs(a)
in
#
int()
38. Adds something to a variable
abs(a)
*
else
=
39. unction to read one line of a file
:
readline
*read
=
40. The keyword beginning a header that will create a new function.
*
abs(a)
**=
def
41. Writes stuff to the file.
str
*write(stuff)
elif (Else if)
>=
42. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
class
n
=
open()
43. adds an item to a list
=
a**b
append()
str
44. Symbol to divide by the number to the right of the symbol
/
%s
a**b
format string
45. The keyword beginning a header that will create a loop.
in
for
in
%
46. absolute value
float
+
abs(a)
>=
47. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
%d
file.readline()
if
int
48. exponent AND assignment operator
else
*=
**=
+
49. Less than or equal to symbol
round()
for
<=
print()
50. A logical operator which requires two expressions to both be true.
%s
and
open()
>>
Sorry!:) No result found.
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