Test Python 3.0 lab FLA
* Required
Email address
*
Your email
What is the constructor function name in Python classes?
*
60 points
_init_
_begin_
The name of the class
_consctruct_
__init__
Required
Which is the "main" function in python 3.0
*
60 points
__main__
start
python 3.0 does not have a defined "main" function
begin
main
Required
Which of the following is a correct python 3.0 syntax?
*
110 points
a,b,c=7
a,b,c===5,6,7
a,b,c = 5, 6, 7
a = 5= b = 7 = c = 10
a = b = c = 5
Required
What is the output of the following python call >>> """Hello World"""[1:6]
*
60 points
Syntax not correct because we can not use triple quotes with strings
ello_
ello
'ello'
'ello '
Required
Nume, Prenume, Grupa
*
Your answer
Which is the correct function to update a python tuple?
*
60 points
Python tuples are immutable
chnage()
update()
add()
del()
Required
What are the possible return values of the cmp() function?
*
60 points
-1, 0 , 1
0, 1, 2
TRUE, FALSE
True, False
0, 1
Required
Which is the correct statement/function to remove all the elements in a dictionary?
*
60 points
None of the above/below
delete()
del()
clear()
removeall()
Required
In python, is it possible to have function declarations inside other functions:
*
60 points
No
Maybe
Yes
Required
Which is the correct way to instantiate a tuple in python 3.0?
*
110 points
tup = ('physics', 'chemistry', 1997, 2000)
tup1 = 'physics', 'chemistry', 1997, 2000
tup = ['physics', 'chemistry', 1997, 2000]
tup1 = {'physics', 'chemistry', 1997, 2000}
None of the above is correct
Required
Which of the following is a correct definition of a sum function with 2 parameters in python 3.0 ?
*
60 points
def sum(int a, int b): return a+b
sum(): return a+b
def sum(a,b): return a+b
def sum(int b): return a+b
def sum(int a): return a+b
Required
Which of the following are python libraries for mathematical processing
*
60 points
None of the above/below
SciPy, MatPlotPy, NumPy
SciPy, NumPy, PlotPy
SciPy, MatPlotLib, NumPy
SciPy, PlotPy
Required
Which are python's standard data types?
*
60 points
Numbers, String, List, Tuple
Numbers, String, List, Tuple, Dictionary
Numbers, String, List, Tuple, Dictionary, Hash
Numbers, String, List, Dictionary
Numbers, List, Tuple
Required
Is the following python syntax correct? class Base(metaclass=ABCMeta): \n _____@abstractmethod \n _____def foo(self): \n _________pass \n
*
60 points
No. "@abstractmethod" keyword has no sense in python
No. There is no pass function in python
Yes
No. The keyword "self" should be replaced with "this"
No. There should be no "metaclass"
Required
Which of the following is a correct python 3.0 syntax?
*
60 points
print("Hello World)
print("Hello World")
print('Hello World')
print("Hello World')
print "Hello World"
Required
What is the acronym for abstract classes in python
*
60 points
ABS
None of the above/below
ABc
AC
ABC
Required
A copy of your responses will be emailed to the address you provided.
Submit
Never submit passwords through Google Forms.
reCAPTCHA
Privacy
Terms
This content is neither created nor endorsed by Google.
Report Abuse
-
Terms of Service
-
Privacy Policy
Forms