Python Essentials 1:
Python Essentials 2:
Python Essentials - Final Test:
Warning!
For searching questions, CTRL+F .if you want correct answer.. type manually.Don't Copy & paste questions in search space.
If you copy paste questions in search options means.. you can't find answer
The following code:
print(ord('c') - ord('a'))prints:
0231
The following code:
print (float("1, 3" ))- prints
1, 3 - raises a
ValueErrorexception - prints
1.3 - prints
13
- prints
The top-most Python exception is called:
- TopException
- Exception
BaseException- PythonException
The following statement:
assert var == 0- is erroneous
- will stop the program when
var != 0 - has no effect
- will stop the program when
var == 0
UNICODE is a standard:
- used by coders from universities
- honored by the whole universe
- like ASCII, but much more expansive
- for coding floating-point numbers
ASCII is:
- a predefined Python variable name
- a standard Python module name
- a character name
- short for American Standard Code for Information Interchange
The following code:
print(3 * 'abc' +'xyz')prints:
xyzxyzxyzxyzabcabcxyzxyzabcabcabcxyzabcxyzxyzxyz
UTF-8 is:
- a Python version name
- the 9th version of the UTF standard
- a form of encoding Unicode code points
- a synonym for byte
Entering the
try:block implies that:- all of the instructions from this block will be executed
- some of the instructions from this block may not be executed
- the block will be omitted
- none of the instructions from this block will be executed
What is the expected output of the following code?
try print("5"/0) except ArithmeticError: print("arith") except ZeroDivisionError: print("zero") except: print("some")zero0somearith
The unnamed
except:block:- must be the first one
- can be placed anywhere
- cannot be used if any named block has been used
- must be the last one
The following code:
print('Mike' > " Mikey")prints:
01TrueFalse
The following code:
print(chr(ord('z') - 2))prints:
zyax
The following code:
x = '\' 'print(len(x))prints:
32201
Which of the following are examples of Python built-in concrete exceptions?(Select two answers)
ArithemticErrorIndexErrorBaseExceptionImportError
Python Essentials 1:
Python Essentials 2:
Python Essentials - Final Test:
