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

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

The document outlines Week 6 of the 'Joy of Computing using Python' course, including details about assignments, quizzes, and programming tasks. It features questions related to recursion, substitution ciphers, and Python functions, along with accepted answers and scores. The assignment submission deadline was on March 5, 2025, and the document also includes links to various course resources.

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)
19 views

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

The document outlines Week 6 of the 'Joy of Computing using Python' course, including details about assignments, quizzes, and programming tasks. It features questions related to recursion, substitution ciphers, and Python functions, along with accepted answers and scores. The assignment submission deadline was on March 5, 2025, and the document also includes links to various course resources.

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 9 - Week 6

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

sanatseth24@gmail.com 

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)

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

click to check your Due on 2025-03-05, 23:59 IST.


payment status
Assignment submitted on 2025-03-05, 22:02 IST
1) If n is a positive integer, what is the output of the function given input n, 1 point
Course outline

About NPTEL ()

How does an NPTEL


online course work? ()

Week 1 () Sum of numbers from 1 to n


Sum of numbers from 1 to n-1
Week 2 () n-1
n
Introduction to Anaconda
(unit?unit=37&lesson=38) Yes, the answer is correct.
Score: 1
Installation of Anaconda Accepted Answers:
(unit?unit=37&lesson=39) Sum of numbers from 1 to n
Introduction to Spyder
IDE (unit? 2) Assertion (A): If a recursive function doesn’t have a base case, it may never stop. 1 point
unit=37&lesson=40) Reason (R): Recursion means that a function calls itself.

Printing statements in
Both (A) and (R) are true, and (R) is the correct explanation of (A).
Python (unit?
unit=37&lesson=41)
Both (A) and (R) are true, but (R) is not the correct explanation of (A).
(A) is true, but (R) is false.
Understanding Variables
in Python (unit? (A) is false, but (R) is true.
unit=37&lesson=42) Yes, the answer is correct.
Score: 1
Executing a sequence of
Accepted Answers:
instructions in the
Both (A) and (R) are true, but (R) is not the correct explanation of (A).
Console (unit?
unit=37&lesson=43)
3) What is the output of following code ? 1 point
Writing your First
Program (unit?
unit=37&lesson=44)

Taking inputs from the


user (unit?
unit=37&lesson=45)

Discount Calculation
(unit?unit=37&lesson=46)

Motivation to if condition
(unit?unit=37&lesson=47)

A reminder on how to
deal with numbers (unit?
unit=37&lesson=48)

Understanding if Error
condition's working (unit?
25
unit=37&lesson=49)

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=124&assessment=523 1/3
04/04/2025, 09:33 The Joy of Computing using Python - - Unit 9 - Week 6

Realizing the importance 26


of syntax and indentation
5
(unit?unit=37&lesson=50)
Yes, the answer is correct.
Introductions to loops Score: 1
(unit?unit=37&lesson=51) Accepted Answers:
26
Loops: Sum of numbers
(unit?unit=37&lesson=52) 4) In English, the letter ‘z’ usually appears far less often than most letters. Now imagine applying a Substitution Cipher to a large 1 point
Loops: Sum of numbers
body of English text, where ‘z’ is replaced by ‘r’, and every other letter is also mapped to a unique letter. After encryption, which letter is likely
(continued) (unit? to be the least frequent in the new text?
unit=37&lesson=53) Hint: Search the internet for more info, if needed.

Loops: Multiplication z
Tables (unit?
r
unit=37&lesson=54)
e
Introduction to While
It is not possible to determine
Loop (unit?
unit=37&lesson=55) Yes, the answer is correct.
Score: 1
Week 2 Feedback Form:
Accepted Answers:
The Joy of Computing
r
using Python (unit?
unit=37&lesson=56)
5) If you have a large ciphertext produced by a simple substitution cipher on an English text, can you determine the original 1 point
Quiz: Week 2 : message by examining how often each letter appears?
Assignment 2 Hint: Search the internet for more info, if needed.
(assessment?name=503)
Yes, it can be done.
Week 2: Programming
Assignment 1 No, it cannot be done.
(/noc25_cs69/progassign
Yes, the answer is correct.
ment?name=504) Score: 1
Week 2: Programming
Accepted Answers:
Assignment 2
Yes, it can be done.
(/noc25_cs69/progassign
ment?name=505) 6) Suppose you suspect that a piece of ciphertext was produced using a simple sub-stitution cipher. Under which circumstances 1 point
might frequency analysis fail to yield accurate results?
Week 2: Programming
Assignment 3
The ciphertext is short.
(/noc25_cs69/progassign
ment?name=506) The ciphertext was encrypted with another method before encrypting with sub-stitution cipher.
The ciphertext is very long.
Week 3 ()
Yes, the answer is correct.
Score: 1
week 4 () Accepted Answers:
The ciphertext is short.
Week 5 () The ciphertext was encrypted with another method before encrypting with sub-stitution cipher.

Week 6 () 7) If variable dict_name is a non-empty dictionary, what does dict name.values() re-turn? 1 point

Substitution Cipher -The Returns nothing, but prints all the keys in the dictionary.
science of secrecy (unit?
Returns a list of all the keys in the dictionary.
unit=124&lesson=125)
Returns a list of all the values in the dictionary.
Substitution Cipher -The
Returns a list of all the items in the dictionary.
science of secrecy 01
(unit? Yes, the answer is correct.
unit=124&lesson=126) Score: 1
Accepted Answers:
Substitution Cipher -The
Returns a list of all the values in the dictionary.
science of secrecy 02
(unit?
unit=124&lesson=127) 8) Assertion (A): A Caesar Cipher is a type of Substitution Cipher. 1 point
Reason (R): In a Caesar Cipher, each letter in the plaintext is replaced by a letter at a fixed shift in the alphabet.
Substitution Cipher -The
science of secrecy 03 Both (A) and (R) are true, and (R) is the correct explanation of (A).
(unit?
Both (A) and (R) are true, but (R) is not the correct explanation of (A).
unit=124&lesson=128)
(A) is true, but (R) is false.
Tic Tac Toe - Down the
(A) is false, but (R) is true.
memory Lane (unit?
unit=124&lesson=129) Yes, the answer is correct.
Score: 1
Tic Tac Toe - Down the Accepted Answers:
memory Lane 01 (unit? Both (A) and (R) are true, and (R) is the correct explanation of (A).
unit=124&lesson=130)

Tic Tac Toe - Down the 9) Which outcome generally follows from providing a proper base case in a recursive function? 1 point
memory Lane 02 (unit?
unit=124&lesson=131) The function returns a predefined result when the base condition is met.
It prevents infinite recursion and stops when a specific codition is met.

https://onlinecourses.nptel.ac.in/noc25_cs69/unit?unit=124&assessment=523 2/3
04/04/2025, 09:33 The Joy of Computing using Python - - Unit 9 - Week 6

Tic Tac Toe - Down the It ensures recursion depth is always constant.
memory Lane 03 (unit?
It allows the function to keep calling itself indefinitely.
unit=124&lesson=132)
Yes, the answer is correct.
Tic Tac Toe - Down the Score: 1
memory Lane 04 (unit? Accepted Answers:
unit=124&lesson=133) The function returns a predefined result when the base condition is met.
It prevents infinite recursion and stops when a specific codition is met.
Tic Tac Toe - Down the
memory Lane 05 (unit? 10) In a standard 3×3 Tic-Tac-Toe board, how many distinct winning lines (rows, columns, or diagonals) pass through the center 1 point
unit=124&lesson=134)
square?
Recursion (unit?
unit=124&lesson=135) 3
2
Recursion 01 (unit?
unit=124&lesson=136) 5
4
Recursion 02 (unit?
unit=124&lesson=137) Yes, the answer is correct.
Score: 1
Recursion 03 (unit? Accepted Answers:
unit=124&lesson=138) 4
Recursion 04 (unit?
unit=124&lesson=139)

Recursion 05 (unit?
unit=124&lesson=140)

Recursion 06 (unit?
unit=124&lesson=141)

Week 6 Feedback Form:


The Joy of Computing
using Python (unit?
unit=124&lesson=142)

Quiz: Week 6 :
Assignment 6
(assessment?
name=523)

Week 6: Programming
Assignment 1
(/noc25_cs69/progassign
ment?name=524)

Week 6: Programming
Assignment 2
(/noc25_cs69/progassign
ment?name=525)

Week 6: Programming
Assignment 3
(/noc25_cs69/progassign
ment?name=526)

Week 7 ()

Week 8 ()

Week 9 ()

Week 10 ()

Week 11 ()

Text Transcripts ()

Download Videos ()

Books ()

Problem Solving
Session - Jan 2025 ()

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy