Assignment 1
Assignment 1
Assignment 1
4) Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.pop(1)?
def myfunc(a):
a=a+2
a=a*2
return a
print myfunc(2)
(i) 8 ii) 16 (iii) Indentation Error (iv) Runtime Error
6)There is a Dictionary employee={‘salary:10000’,’dept’:Sales,’age’:24,’name’:’John’}
Which of the following function will provide all the values of dictionary?
7)Which of the following symbol is used to replicate two strings or two lists or two tuples?
1) What is local and global scope of a function? How to identify which function has local or
global scope in function.?
2) Write and give brief explanation of type of files.
3) Write and give brief explanation of type of function.
4) Give any two function name and its syntax of Dictionary.
5) What is packing and unpacking of tuple ? Give example.
**************************************************