Professional Documents
Culture Documents
Programming, Data Structures and Algorithms Using Python - Unit 5 - Week 2 Quiz
Programming, Data Structures and Algorithms Using Python - Unit 5 - Week 2 Quiz
unit=33&assessment=146
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
vani.yamani@gmail.com
Click to register
for Certification
exam
(https://examform.nptel.ac.in
Week 2 Quiz
/2023_10 Your last recorded submission was on 2023-08-03, 17:31 IST Due date: 2023-08-09, 23:59 IST.
/exam_form All questions carry equal weightage. All Python code is assumed to be executed using Python3. You
/dashboard) may submit as many times as you like within the deadline. Your final submission will be graded.
Note:
If already • If the question asks about a value of type string, remember to enclose your answer in
registered, click single or double quotes.
to check your • If the question asks about a value of type list, remember to enclose your answer in square
payment status 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 between 1 and 10.)
8
Week 1 Quiz
() 2.5 points
1 of 2 08-08-2023, 15:20
Programming, Data Structures And Algorithms Using Python - - Unit 5... https://onlinecourses.nptel.ac.in/noc23_cs95/unit?unit=33&assessment=146
Week 2: b = [23,44,87,100]
Basics of a = b[1:]
Python () d = b[2:]
c = b
Week 2 Quiz d[0] = 97
() c[2] = 77
Quiz: Week 2
Which of the following holds at the end of this code?
Quiz
(assessment? a[1] == 77, b[2] == 77, c[2] == 77, d[0] == 97
name=146)
a[1] == 87, b[2] == 87, c[2] == 77, d[0] == 97
Week 2 a[1] == 87, b[2] == 77, c[2] == 77, d[0] == 97
Programming a[1] == 97, b[2] == 77, c[2] == 77, d[0] == 97
Assignment ()
3) What is the value of endmsg after executing the following lines?
Week 3: Lists, startmsg = "python"
inductive endmsg = ""
function for i in range(1,1+len(startmsg)):
definitions,
endmsg = startmsg[-i] + endmsg
sorting ()
nohtyp
Week 3
Programming 2.5 points
Assignment ()
4) What is the value of mylist after the following lines are executed?
2 of 2 08-08-2023, 15:20