0 of 5 questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 5 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
write a Python program to swap first and last element of the list.
Input : [12, 35, 9, 56, 24] Output : [24, 35, 9, 56, 12]
This response will be reviewed and graded after submission.
Python program to find the largest number in a list.
Input : list1 = [10, 20, 4] Output : 20
Python program to print all positive numbers in a range.
Input: start = -4, end = 5 Output: 0, 1, 2, 3, 4, 5
This response will be reviewed and graded after submission.
What is the output of the following Python code ?
def extendList(val, list=[]): list.append(val) return list list1 = extendList(10) list2 = extendList(123,[]) list3 = extendList('a') print "list1 = %s" % list1 print "list2 = %s" % list2 print "list3 = %s" % list3
This response will be reviewed and graded after submission.
What are Closures in Python? With example.
This response will be reviewed and graded after submission.