Programming, Data Structures and Algorithms Using Python - Unit 3 - Week 1 Quiz
Programming, Data Structures and Algorithms Using Python - Unit 3 - Week 1 Quiz
unit=23&assessment=145
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
Click to register
for Certification
exam
(https://examform.nptel.ac.in
Week 1 Quiz
/2023_10 Your last recorded submission was on 2023-07-26, 15:53 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.
Week 1 Quiz
()
1 of 3 08-08-2023, 15:21
Programming, Data Structures And Algorithms Using Python - - Unit 3... https://onlinecourses.nptel.ac.in/noc23_cs95/unit?unit=23&assessment=145
Quiz: Week 1
def f(n):
Quiz
s = 0
(assessment?
for i in range(2,n):
name=145)
if n%i == 0 and i%2 == 1:
Week 2: s = s+1
Basics of return(s)
Python ()
Week 2 Quiz 5
() 2.5 points
Books ()
def foo(m):
if m == 0:
Download
return(0)
Videos ()
else:
return(m+foo(m-1))
Problem
Solving
Which of the following is correct?
Session -
July 2023 () The function always terminates with foo(n) = factorial of n
The function always terminates with foo(n) = n(n+1)/2
The function terminates for nonnegative n with foo(n) = factorial of n
The function terminates for nonnegative n with foo(n) = n(n+1)/2
You may submit any number of times before the due date. The final submission will be considered
for grading.
Submit Answers
2 of 3 08-08-2023, 15:21
Programming, Data Structures And Algorithms Using Python - - Unit 3... https://onlinecourses.nptel.ac.in/noc23_cs95/unit?unit=23&assessment=145
3 of 3 08-08-2023, 15:21