0% found this document useful (0 votes)
6 views

The Joy of Computing using Python - - Unit 8 - Week 5

The document outlines Week 5 of the 'Joy of Computing using Python' course, detailing assignment questions and answers related to dictionaries, probability, binary search, and sorting algorithms. It includes specific questions about programming concepts, with correct answers and scores provided. The assignment was due on February 26, 2025, and students could submit their answers through the NPTEL platform.

Uploaded by

sanat seth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

The Joy of Computing using Python - - Unit 8 - Week 5

The document outlines Week 5 of the 'Joy of Computing using Python' course, detailing assignment questions and answers related to dictionaries, probability, binary search, and sorting algorithms. It includes specific questions about programming concepts, with correct answers and scores provided. The assignment was due on February 26, 2025, and students could submit their answers through the NPTEL platform.

Uploaded by

sanat seth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

04/04/2025, 09:33 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)

If already registered, The due date for submitting this assignment has passed.

click to check your Due on 2025-02-26, 23:59 IST.


payment status
Assignment submitted on 2025-02-26, 21:50 IST
1) Which of the following is the correct way to add data with key as CS102 and value as 1 point
Course outline "Database Management Systems" to a dictionary named courses?

About NPTEL () courses["CS101"] = ("Database Management Systems")

How does an NPTEL courses["CS102"]["Database Management Systems"]

online course work? ()


courses["CS102"] = "Database Management Systems"

Week 1 ()
courses["CS101"] = "Database Management Systems"

Week 2 () Yes, the answer is correct.


Score: 1
Accepted Answers:
Week 3 () courses["CS102"] = "Database Management Systems"

week 4 () 2) What is the probability of Monty not opening the door with goat, given the hypothesis that you initially chose the door which has 1 point
car ?
Week 5 ()
0
Introduction to
0.5
Dictionaries (unit?
unit=104&lesson=105) 1
0.33
Speech to Text : No need
to write 01 (unit? Yes, the answer is correct.
unit=104&lesson=106) Score: 1
Accepted Answers:
Speech to Text : No need
0
to write 02 (unit?
unit=104&lesson=107)
3) What should be replaced with ? in line 10, so that there is high chance that final_choice is equal to 2 ? 1 point
Speech to Text : No need
to write 03 (unit?
unit=104&lesson=108)

Monte Hall : 3 doors and


a twist 01 (unit?
unit=104&lesson=109)

Monte Hall : 3 doors and


a twist 02 (unit?
unit=104&lesson=110)

Rock, Paper and Scissor :


Cheating not allowed !! 01
(unit?
unit=104&lesson=111)

Rock, Paper and Scissor :


Cheating not allowed !! 02 2
(unit?
unit=104&lesson=112) 2 ∗ ∗(1024) % 2 != 0
Rock, Paper and Scissor :
Cheating not allowed !! 03 2 ∗ (2 ∗ ∗(89) + 7) % 2 == 0

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=104&assessment=519 1/3
04/04/2025, 09:33 The Joy of Computing using Python - - Unit 8 - Week 5

(unit? (2 ∗ ∗(90)) % len(doors) != 1


unit=104&lesson=113)
Yes, the answer is correct.
Rock, Paper and Scissor : Score: 1
Cheating not allowed !! 04 Accepted Answers:
(unit? 2
unit=104&lesson=114) 2 ∗ (2 ∗ ∗(89) + 7) % 2 == 0

Sorting and Searching : 4) Given that you have a sorted list of 2048 elemets,what is the maximum number of comparisons to search such an element using 1 point
20 questions game 01 linear search ? Can binary search do it in less number of comparisons ?
(unit?
unit=104&lesson=115) Yes, binary search can do it more efficiently, linear search takes 1024 comparisons

Sorting and Searching : Yes, binary search can do it more efficiently, linear search takes 2048 comparisons
20 questions game 02 No, binary search may/may not do it more efficiently, linear search takes 1024 comparisons
(unit?
No, binary search will take more comparisons, linear search takes 2048 comparisons
unit=104&lesson=116)
Yes, the answer is correct.
Sorting and Searching : Score: 1
20 questions game 03 Accepted Answers:
(unit? Yes, binary search can do it more efficiently, linear search takes 2048 comparisons
unit=104&lesson=117)

Sorting and Searching : 5) What is the primary use of a file with a .wav or .wave extension? 1 point
20 questions game 04
(unit? Storing video recordings
unit=104&lesson=118) Storing log files
Sorting and Searching : Storing waves of files
20 questions game 05 Storing audio recordings
(unit?
unit=104&lesson=119) Yes, the answer is correct.
Score: 1
Sorting and Searching : Accepted Answers:
20 questions game 06 Storing audio recordings
(unit?
unit=104&lesson=120) 6) What does this program print in the end ? 1 point
Sorting and Searching :
20 questions game 07
(unit?
unit=104&lesson=121)

Sorting and Searching :


20 questions game 08
(unit?
unit=104&lesson=122)

Week 5 Feedback Form:


The Joy of Computing
using Python (unit?
unit=104&lesson=123)
Fraction of throws where both players showed different symbol(rock/paper/scissors)
Quiz: Week 5 :
Assignment 5 Fraction of throws where both players showed rock.
(assessment? Fraction of throws where both players showed same symbol(rock/paper/scissors)
name=519)
Fraction of throws where both players showed paper.
Week 5: Programming
No, the answer is incorrect.
Assignment 1 Score: 0
(/noc25_cs69/progassign
Accepted Answers:
ment?name=520)
Fraction of throws where both players showed different symbol(rock/paper/scissors)
Week 5: Programming
Assignment 2 7) In binary search the list gets divided in every iteration to find the element. 1 point
(/noc25_cs69/progassign
ment?name=521) True

Week 5: Programming
False
Assignment 3 Yes, the answer is correct.
(/noc25_cs69/progassign Score: 1
ment?name=522) Accepted Answers:
True
Week 6 ()
8) Which of the following are requirements for binary search to work correctly? 1 point
Week 7 ()
The list can be unsorted.
Week 8 () The list must contain only positive integers.
The list must be sorted.
Week 9 ()
The list must have no duplicate values.

Week 10 () Yes, the answer is correct.


Score: 1
Week 11 () Accepted Answers:
The list must be sorted.

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=104&assessment=519 2/3
04/04/2025, 09:33 The Joy of Computing using Python - - Unit 8 - Week 5

9) Given an array [4, 2, 7, 1, 3], what will be the array after the third pass of Bubble Sort? 1 point
Text Transcripts ()

Download Videos () [1, 3, 2, 4, 7]

[2, 4, 1, 3, 7]
Books ()

[1, 2, 3, 4, 7]
Problem Solving
Session - Jan 2025 () [2, 1, 3, 4, 7]

Yes, the answer is correct.


Score: 1
Accepted Answers:
[1, 2, 3, 4, 7]

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.

Yes, the answer is correct.


Score: 1
Accepted Answers:
(Type: Numeric) 2

1 point

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=104&assessment=519 3/3

You might also like