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. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
if
#
int
==
2. This keyword begins a header for a body that repeats until the condition is no longer true.
while
file.truncate()
/
-=
3. Function to close a file - it will not be able to be used again unless the file is opened.
abs(a)
=
**=
close
4. 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
+=
readline
5. A logical operator which returns a value of True if either of the conditions is true.
a%b
or
+=
6. Less than symbol
file.seek()
<
readline
*
7. End header line.
.py
def
:
append()
8. Adds something to a variable
%
=
*=
while
9. modulo
a%b
#
==
in
10. Argument variable
&
argv
%r
print()
11. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
*=
=
Variables
math.sqrt(a)
12. This keyword in the body of a conditional - gives an alternative execution.
while
>>
elif (Else if)
else
13. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
str()
try
format string
~
14. absolute value
abs(a)
:
*write(stuff)
/=
15. returns the length of a string (number of characters)
len()
+
def
()
16. The keyword beginning a header that will create a loop.
for
*
%d
17. adds an item to a list
#
else
append()
>=
18. Symbol to subtract things from each other
def
else
<<
-
19. turns an object into a string
len()
str()
%s
=
20. Less than symbol
<
:
int()
argv
21. Where the parameters go. A necessary punctuation after any function even if it's empty.
<
()
*readline
argv
22. The extension for Python scripts
.py
insert()
input()
^
23. Command to print to the screen
/
print
n
%d
24. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.
file.truncate()
^
in
not in
25. rounds a number to the number of decimal points you choose
file.seek()
round()
*write(stuff)
*=
26. unction to read one line of a file
%d
:
not
readline
27. single line comment
#
%s
-=
/=
28. Prints a string to the screen which is converted using repr()
%s
*
%r
in
29. modulo
a%b
file.truncate()
==
int()
30. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
in
try
class
while
31. rounds a number to the number of decimal points you choose
^
round()
def
a//b
32. A built-in function that converts its argument to a string.
a%b
+
str
argument variable
33. Greater than or equal symbol.
=
for
>=
==
34. writes stuff to the file
%r
>
file.write(stuff)
/=
35. Command to print to the screen
<=
*readline
%d
print
36. This statement causes an exception.
<<
raise
<=
str
37. 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
^
~
file.truncate()
38. prints its parameter to the console
print()
**=
+=
#
39. Modulus operator. It's the remainder after division
n
%
try
append()
40. A built-in function that converts integers and strings to floating-point numbers.
-
*=
float
close
41. turns an object into a string
in
pass
try
str()
42. This statement exits a function. The remaining lines of the function are not executed.
=
input()
*=
return
43. ,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.
=
write
float
44. Reads the contents of the file you can assign the result to a variable.
print
&
*read
argv
45. A logical operator which negates an expression so that it returns a value of True if the expression is false.
^
not
write
truncate
46. This keyword in the body of a conditional allows chained conditionals.
elif (Else if)
and
-
47. A statement that ends the current iteration of a loop but continues looping.
==
continue
&
48. A statement that breaks out of a loop.
break
assignment
else
and
49. exponentiation
-
print
print
a**b
50. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
and
insert()
float
argv
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