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

The Joy of Computing using Python - - Unit 9 - Week 6

The document outlines the Week 6 assignment for the NPTEL course 'The Joy of Computing using Python', detailing various questions related to programming concepts such as recursion, substitution ciphers, and Tic-Tac-Toe. It includes information on submission deadlines, scoring, and accepted answers for the assignment questions. The assignment has a due date of March 5, 2025, and includes multiple-choice questions for evaluation.

Uploaded by

V.G.PADMAPRIYA
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)
4 views

The Joy of Computing using Python - - Unit 9 - Week 6

The document outlines the Week 6 assignment for the NPTEL course 'The Joy of Computing using Python', detailing various questions related to programming concepts such as recursion, substitution ciphers, and Tic-Tac-Toe. It includes information on submission deadlines, scoring, and accepted answers for the assignment questions. The assignment has a due date of March 5, 2025, and includes multiple-choice questions for evaluation.

Uploaded by

V.G.PADMAPRIYA
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/ 5

4/15/25, 5:54 PM The Joy of Computing using Python - - Unit 9 - Week 6

(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 6 : Assignment 6
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-03-05, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-03-03, 05:23 IST
payment status
1) If n is a positive integer, what is the output of the function given input n, 1 point

Course
outline

About NPTEL
()
Sum of numbers from 1 to n

How does an Sum of numbers from 1 to n-1


NPTEL online n-1
course work? n
()
Yes, the answer is correct.
Score: 1
Week 1 ()
Accepted Answers:
Sum of numbers from 1 to n
Week 2 ()

2) Assertion (A): If a recursive function doesn’t have a base case, it may never stop. 1 point
Week 3 ()
Reason (R): Recursion means that a function calls itself.

week 4 () Both (A) and (R) are true, and (R) is the correct explanation of (A).
Both (A) and (R) are true, but (R) is not the correct explanation of (A).

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=124&assessment=523 1/5
4/15/25, 5:54 PM The Joy of Computing using Python - - Unit 9 - Week 6

Week 5 () (A) is true, but (R) is false.


(A) is false, but (R) is true.
Week 6 () Yes, the answer is correct.
Score: 1
Substitution Accepted Answers:
Cipher -The Both (A) and (R) are true, but (R) is not the correct explanation of (A).
science of
secrecy (unit? 3) What is the output of following code ? 1 point
unit=124&lesso
n=125)

Substitution
Cipher -The
science of
secrecy 01
(unit?
unit=124&lesso
n=126)

Substitution
Cipher -The
science of
secrecy 02
(unit?
unit=124&lesso
n=127) Error
25
Substitution
Cipher -The 26
science of 5
secrecy 03
(unit? Yes, the answer is correct.
Score: 1
unit=124&lesso
n=128) Accepted Answers:
26
Tic Tac Toe -
Down the
4) In English, the letter ‘z’ usually appears far less often than most letters. Now imagine 1 point
memory Lane
applying a Substitution Cipher to a large body of English text, where ‘z’ is replaced by ‘r’, and every
(unit?
other letter is also mapped to a unique letter. After encryption, which letter is likely to be the least
unit=124&lesso
n=129)
frequent in the new text?
Hint: Search the internet for more info, if needed.
Tic Tac Toe -
Down the z
memory Lane
r
01 (unit?
unit=124&lesso e
n=130) It is not possible to determine

Tic Tac Toe - Yes, the answer is correct.


Down the Score: 1
memory Lane Accepted Answers:
02 (unit? r

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=124&assessment=523 2/5
4/15/25, 5:54 PM The Joy of Computing using Python - - Unit 9 - Week 6

unit=124&lesso 5) If you have a large ciphertext produced by a simple substitution cipher on an English 1 point
n=131) text, can you determine the original message by examining how often each letter appears?
Tic Tac Toe -
Hint: Search the internet for more info, if needed.
Down the
Yes, it can be done.
memory Lane
03 (unit? No, it cannot be done.
unit=124&lesso
Yes, the answer is correct.
n=132) Score: 1
Tic Tac Toe - Accepted Answers:
Down the Yes, it can be done.
memory Lane
04 (unit? 6) Suppose you suspect that a piece of ciphertext was produced using a simple sub- 1 point
unit=124&lesso stitution cipher. Under which circumstances might frequency analysis fail to yield accurate results?
n=133)
The ciphertext is short.
Tic Tac Toe -
Down the The ciphertext was encrypted with another method before encrypting with sub-stitution
memory Lane cipher.
05 (unit? The ciphertext is very long.
unit=124&lesso
n=134) Yes, the answer is correct.
Score: 1
Recursion Accepted Answers:
(unit? The ciphertext is short.
unit=124&lesso The ciphertext was encrypted with another method before encrypting with sub-stitution cipher.
n=135)

Recursion 01 7) If variable dict_name is a non-empty dictionary, what does dict name.values() re-turn? 1 point
(unit?
unit=124&lesso Returns nothing, but prints all the keys in the dictionary.
n=136) Returns a list of all the keys in the dictionary.

Recursion 02 Returns a list of all the values in the dictionary.


(unit? Returns a list of all the items in the dictionary.
unit=124&lesso
Yes, the answer is correct.
n=137)
Score: 1
Recursion 03 Accepted Answers:
(unit? Returns a list of all the values in the dictionary.
unit=124&lesso
n=138) 8) Assertion (A): A Caesar Cipher is a type of Substitution Cipher. 1 point
Recursion 04
Reason (R): In a Caesar Cipher, each letter in the plaintext is replaced by a letter at a fixed shift in
(unit? the alphabet.
unit=124&lesso
n=139)
Both (A) and (R) are true, and (R) is the correct explanation of (A).
Both (A) and (R) are true, but (R) is not the correct explanation of (A).
Recursion 05
(unit? (A) is true, but (R) is false.
unit=124&lesso (A) is false, but (R) is true.
n=140)
Yes, the answer is correct.
Recursion 06
(unit?

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=124&assessment=523 3/5
4/15/25, 5:54 PM The Joy of Computing using Python - - Unit 9 - Week 6

unit=124&lesso Score: 1
n=141) Accepted Answers:
Both (A) and (R) are true, and (R) is the correct explanation of (A).
Week 6
Feedback 9) Which outcome generally follows from providing a proper base case in a recursive 1 point
Form: The Joy function?
of Computing
using Python The function returns a predefined result when the base condition is met.
(unit?
It prevents infinite recursion and stops when a specific codition is met.
unit=124&lesso
n=142) It ensures recursion depth is always constant.
It allows the function to keep calling itself indefinitely.
Quiz: Week 6 :
Assignment 6 Yes, the answer is correct.
(assessment? Score: 1
name=523) Accepted Answers:
The function returns a predefined result when the base condition is met.
Week 6:
It prevents infinite recursion and stops when a specific codition is met.
Programming
Assignment 1
(/noc25_cs69/p
10) In a standard 3×3 Tic-Tac-Toe board, how many distinct winning lines (rows, columns, 1 point
rogassignment or diagonals) pass through the center square?
?name=524)
3
Week 6:
2
Programming
Assignment 2 5
(/noc25_cs69/p 4
rogassignment
?name=525)
Yes, the answer is correct.
Score: 1
Week 6: Accepted Answers:
Programming 4
Assignment 3
(/noc25_cs69/p
rogassignment
?name=526)

Week 7 ()

Week 8 ()

Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

Text
Transcripts ()

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=124&assessment=523 4/5
4/15/25, 5:54 PM The Joy of Computing using Python - - Unit 9 - Week 6

Download
Videos ()

Books ()

Problem
Solving
Session - Jan
2025 ()

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=124&assessment=523 5/5

You might also like