4/15/25, 5:53 PM The Joy of Computing using Python - - Unit 8 - Week 5
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
[email protected]
NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » The Joy of Computing using Python (course)
Click to register
for Certification
exam
Week 5 : Assignment 5
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.
If already Due on 2025-02-26, 23:59 IST.
registered, click
to check your Assignment submitted on 2025-02-26, 04:58 IST
payment status
1) Which of the following is the correct way to add data with key as CS102 and value as 1 point
"Database Management Systems" to a dictionary named courses?
Course courses["CS101"] = ("Database Management Systems")
outline
courses["CS102"]["Database Management Systems"]
About NPTEL
courses["CS102"] = "Database Management Systems"
()
courses["CS101"] = "Database Management Systems"
How does an
NPTEL online Yes, the answer is correct.
Score: 1
course work?
Accepted Answers:
()
courses["CS102"] = "Database Management Systems"
Week 1 ()
2) What is the probability of Monty not opening the door with goat, given the hypothesis 1 point
that you initially chose the door which has car ?
Week 2 ()
0
Week 3 () 0.5
1
week 4 ()
0.33
https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=104&assessment=519 1/5
4/15/25, 5:53 PM The Joy of Computing using Python - - Unit 8 - Week 5
Yes, the answer is correct.
Week 5 () Score: 1
Accepted Answers:
Introduction to 0
Dictionaries
(unit? 3) What should be replaced with ? in line 10, so that there is high chance that 1 point
unit=104&lesso final_choice is equal to 2 ?
n=105)
Speech to Text
: No need to
write 01 (unit?
unit=104&lesso
n=106)
Speech to Text
: No need to
write 02 (unit?
unit=104&lesso
n=107)
Speech to Text
: No need to
write 03 (unit?
unit=104&lesso
n=108) 2
Monte Hall : 3 2 ∗ ∗(1024) % 2 != 0
doors and a
twist 01 (unit?
2 ∗ (2 ∗ ∗(89) + 7) % 2 == 0
unit=104&lesso
n=109)
(2 ∗ ∗(90)) % len(doors) != 1
Monte Hall : 3
Yes, the answer is correct.
doors and a Score: 1
twist 02 (unit? Accepted Answers:
unit=104&lesso 2
n=110)
2 ∗ (2 ∗ ∗(89) + 7) % 2 == 0
Rock, Paper
and Scissor : 4) Given that you have a sorted list of 2048 elemets,what is the maximum number of 1 point
Cheating not comparisons to search such an element using linear search ? Can binary search do it in less
allowed !! 01 number of comparisons ?
(unit?
unit=104&lesso Yes, binary search can do it more efficiently, linear search takes 1024 comparisons
n=111)
Yes, binary search can do it more efficiently, linear search takes 2048 comparisons
Rock, Paper No, binary search may/may not do it more efficiently, linear search takes 1024 comparisons
and Scissor :
Cheating not
No, binary search will take more comparisons, linear search takes 2048 comparisons
allowed !! 02 Yes, the answer is correct.
(unit? Score: 1
unit=104&lesso Accepted Answers:
n=112) Yes, binary search can do it more efficiently, linear search takes 2048 comparisons
https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=104&assessment=519 2/5
4/15/25, 5:53 PM The Joy of Computing using Python - - Unit 8 - Week 5
Rock, Paper 5) What is the primary use of a file with a .wav or .wave extension? 1 point
and Scissor :
Cheating not Storing video recordings
allowed !! 03 Storing log files
(unit?
Storing waves of files
unit=104&lesso
n=113) Storing audio recordings
Rock, Paper
Yes, the answer is correct.
Score: 1
and Scissor :
Accepted Answers:
Cheating not
Storing audio recordings
allowed !! 04
(unit?
unit=104&lesso 6) What does this program print in the end ? 1 point
n=114)
Sorting and
Searching : 20
questions
game 01 (unit?
unit=104&lesso
n=115)
Sorting and
Searching : 20
questions
game 02 (unit?
unit=104&lesso
n=116)
Fraction of throws where both players showed different symbol(rock/paper/scissors)
Sorting and Fraction of throws where both players showed rock.
Searching : 20
Fraction of throws where both players showed same symbol(rock/paper/scissors)
questions
game 03 (unit? Fraction of throws where both players showed paper.
unit=104&lesso Yes, the answer is correct.
n=117) Score: 1
Accepted Answers:
Sorting and
Fraction of throws where both players showed different symbol(rock/paper/scissors)
Searching : 20
questions
game 04 (unit? 7) In binary search the list gets divided in every iteration to find the element. 1 point
unit=104&lesso
n=118) True
False
Sorting and
Searching : 20 Yes, the answer is correct.
questions Score: 1
game 05 (unit? Accepted Answers:
unit=104&lesso True
n=119)
8) Which of the following are requirements for binary search to work correctly? 1 point
Sorting and
Searching : 20
The list can be unsorted.
questions
game 06 (unit? The list must contain only positive integers.
https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=104&assessment=519 3/5
4/15/25, 5:53 PM The Joy of Computing using Python - - Unit 8 - Week 5
unit=104&lesso The list must be sorted.
n=120)
The list must have no duplicate values.
Sorting and
Yes, the answer is correct.
Searching : 20
Score: 1
questions
Accepted Answers:
game 07 (unit?
The list must be sorted.
unit=104&lesso
n=121) 9) Given an array [4, 2, 7, 1, 3], what will be the array after the third pass of Bubble Sort? 1 point
Sorting and
Searching : 20 [1, 3, 2, 4, 7]
questions
game 08 (unit? [2, 4, 1, 3, 7]
unit=104&lesso
n=122) [1, 2, 3, 4, 7]
Week 5
[2, 1, 3, 4, 7]
Feedback
Form: The Joy Yes, the answer is correct.
of Computing Score: 1
using Python Accepted Answers:
(unit? [1, 2, 3, 4, 7]
unit=104&lesso
n=123) 10) How many swaps are performed in iteration 3 for bubble sorting list [5,4,3,2,1]? Enter 0 if the
list is sorted in less than 3 iterations.
Quiz: Week 5 :
Assignment 5
2
(assessment?
name=519) Yes, the answer is correct.
Score: 1
Week 5:
Accepted Answers:
Programming
(Type: Numeric) 2
Assignment 1
(/noc25_cs69/p 1 point
rogassignment
?name=520)
Week 5:
Programming
Assignment 2
(/noc25_cs69/p
rogassignment
?name=521)
Week 5:
Programming
Assignment 3
(/noc25_cs69/p
rogassignment
?name=522)
Week 6 ()
https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=104&assessment=519 4/5
4/15/25, 5:53 PM The Joy of Computing using Python - - Unit 8 - Week 5
Week 7 ()
Week 8 ()
Week 9 ()
Week 10 ()
Week 11 ()
Week 12 ()
Text
Transcripts ()
Download
Videos ()
Books ()
Problem
Solving
Session - Jan
2025 ()
https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=104&assessment=519 5/5