Noc20-Cs26 Week 02 Assignment 01
Noc20-Cs26 Week 02 Assignment 01
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
Python (course)
Course
outline Week 2 Quiz
How to access The due date for submitting this assignment has passed. Due on 2019-08-21, 23:59 IST.
the portal As per our records you have not submitted this assignment.
Week 1: All questions carry equal weightage. All Python code is assumed to be executed using Python3. You
Introduction may submit as many times as you like within the deadline. Your final submission will be graded.
Note:
Week 1 Quiz If the question asks about a value of type string, remember to enclose your answer in single
or double quotes.
Week 2: Basics If the question asks about a value of type list, remember to enclose your answer in square
of Python brackets and use commas to separate list items.
1) One of the following 10 statements generates an error. Which one? (Your answer should be a number
Week 2 Quiz
between 1 and 10.)
Quiz : Week 2
Quiz x = [1,"abcd",2,"efgh",[3,4]] # Statement 1
(assessment? y = x[0:50] # Statement 2
name=89) z = y # Statement 3
w = x # Statement 4
Week 2 x[1] = x[1] + 'd' # Statement 5
Programming y[2] = 4 # Statement 6
Assignment
x[1][1] = 'y' # Statement 7
z[0] = 0 # Statement 8
Week 3: Lists, w[4][0] = 1000 # Statement 9
inductive
a = (x[4][1] == 4) # Statement 10
function
definitions,
sorting
A dA
https://onlinecourses.nptel.ac.in/noc19_cs40/unit?unit=20&assessment=89 1/3
02/07/2020 Programming, Data Structures And Algorithms Using Python - - Unit 5 - Week 2 Quiz
Accepted Answers:
Week 3 (Type: Regex Match) [ ]*7[ ]
Programming
Assignment 2.5 points
Week 6: 3) What is the value of endmsg after executing the following lines?
Backtracking,
startmsg = "hello"
scope, data
structures; endmsg = ""
stacks, queues for i in range(0,len(startmsg)):
and heaps endmsg = startmsg[i] + endmsg
Week 6 Quiz
N h i i
https://onlinecourses.nptel.ac.in/noc19_cs40/unit?unit=20&assessment=89 2/3
02/07/2020 Programming, Data Structures And Algorithms Using Python - - Unit 5 - Week 2 Quiz
https://onlinecourses.nptel.ac.in/noc19_cs40/unit?unit=20&assessment=89 3/3