Problem Solving through Programming in C

The Joy of Computing using Python

Programming, Data Structures And Algorithms using Python

Coursera Answers

Coursera Financial Aid Application
The Joy of Computing using Python


Click here to get 34 Questions asked in Proctored Exam/Final centre Exam "Joy of Computing using python "



Click below to download previous year quizzes of "Joy of Computing Using PYTHON " for Januray to April , 2024(NEW)




Click below to download previous year quizzes of "Joy of Computing Using PYTHON " for June to October , 2023




Click below to download previous year quizzes of "Joy of Computing Using PYTHON " for Januray to April , 2023




Click below to download previous year quizzes of "Joy of Computing Using PYTHON " for April to December, 2022




Click below to download previous year quizzes of "Joy of Computing using python " for January to April, 2022




Click below to download previous year quizzes of "Joy of Computing using python " for April to December, 2021




Click below to download previous year quizzes of "Joy of Computing using python " for January to April, 2021




Click below to download previous year quizzes of "Joy of Computing using python " for April to December, 2020




Click below to download previous year quizzes of "Joy of Computing using python " for January to April, 2020




Click below to download previous year quizzes of "Joy of Computing using python " for April to December, 2018


I don't have any previous weekly quiz for the year 2019.

The Joy of Computing using python week 12 programming answers

Week 12: Programming Assignment 1 [Due on 2025-10-16, 23:59 IST]

Autonomous Warehouse Robot Inventory Update In a modern automated warehouse, an autonomous robot manages a sorted list of product IDs to keep track of available stock. Whenever a new product arrives, the robot must insert its ID into the correct position in the sorted list to maintain order. However, due to limited programming capabilities on the robot’s chip, only append() and remove() methods are available for list operations — all other built-in list methods are restricted. Your Task Write a function: def insert(L, x) that: Takes a sorted list of integers L representing product IDs. Takes an integer x representing the new product ID to be inserted. Returns a new sorted list with x inserted at the correct position without modifying the original list. Input Format You do not need to take input from the user. The function insert(L, x) will be called directly with: L: a sorted list of integers x: a single integer to insert Output Format The function should return the new sorted list after inserting x. Constraints Do not use any list methods except append() and remove(). The list L will always be sorted in ascending order. Example # Example function call print(insert([10, 20, 30, 40], 25)) Output [10, 20, 25, 30, 40]




The Joy of Computing using python week 12 programming answers

Week 12: Programming Assignment 2 [Due on 2025-10-16, 23:59 IST ]

Secure Sensor Data Analysis In a secure data monitoring system, a network of sensors records values periodically. The values are stored in a list L, where each position in the list corresponds to a time slot. To ensure data integrity, a special check is performed: We identify all prime-numbered time slots (based on zero-indexing) and then count how many of those slots contain prime numbers themselves. Your Task Write a function: def primes_galore(L) that: Accepts a list L of non-negative integers. Finds all indices in L that are prime numbers (considering zero-based indexing). Counts how many of those prime indices store prime numbers. Returns this count. You may define and use helper functions (e.g., to check whether a number is prime). Input Format You do not need to take input from the user. The function primes_galore(L) will be called directly with a list of integers. Output Format The function should return an integer: the count of prime indices that store prime numbers.



The Joy of Computing using python week 12 programming answers

Week 12: Programming Assignment 3 [Due on 2025-10-16, 23:59 IST ]

Validating Nested Bracket Sequences In a code analysis system, source files may contain multiple types of brackets: round ( ), square [ ], and curly { }. To ensure correct syntax structure, the system must verify that the brackets are balanced. A bracket sequence is considered balanced if: The number of opening and closing brackets of each type is the same. An opening bracket cannot be immediately followed by a closing bracket of a different type. Every opening bracket must eventually be closed by a bracket of the same type. Your Task Write a function: def balanced(word): that: Accepts a string word (containing only the characters { } [ ] ( )). Returns True if the string is balanced, and False otherwise. You do not need to take input from the user. The function will be called directly with a string argument.







The Joy of Computing using python week 11 programming answers

Week 11: Programming Assignment 1 Due on 2025-10-09, 23:59 IST

Goldbach’s Conjecture Problem Statement: Goldbach’s conjecture is one of the oldest and best-known unsolved problems in number theory. It states that every even number greater than 2 is the sum of two prime numbers. Your Task: Write a function Goldbach(n) where n is a positive even number (n > 2) that returns a list of tuples. Each tuple (a, b) should satisfy: a ≤ b Both a and b are prime numbers a + b = n The tuples should be returned in sorted order. Notes: n will always be an even integer greater than 2. Both numbers in a tuple must be prime. Return the tuples in sorted order. You need to take the input n from the user. Print the output. Examples: # Example 1 Input: 12 Output: [(5, 7)] # Example 2 Input: 26 Output: [(3, 23), (7, 19), (13, 13)]



The Joy of Computing using python week 11 programming answers

Week 11: Programming Assignment 2 Due on 2025-10-09, 23:59 IST

Problem: Selecting Athletes for a Balanced Team A national sports committee is selecting players for an upcoming championship. The goal is to form a balanced team where the performance scores of the selected players are as close as possible. Task Write a function find_Min_Difference(L, P) that determines the smallest possible difference between the highest and lowest scores among any valid selection of P players from the list L. Function Details Input: L: A list of integers representing the performance scores of athletes. P: An integer, the number of athletes to be selected (P < len(L)). Output: An integer representing the smallest possible difference between the maximum and minimum scores of any group of P selected athletes. Notes The scores may not be sorted. Multiple selections may yield the same minimum difference. The function should return the minimum possible difference. Example Input: L = [3, 4, 1, 9, 56, 7, 9, 12, 13] P = 5 Possible selections: [3, 4, 7, 9, 9] → 9 - 3 = 6 [7, 9, 9, 12, 13] → 13 - 7 = 6 Output: 6



The Joy of Computing using python week 11 programming answers

Week 11: Programming Assignment 3 Due on 2025-10-09, 23:59 IST

Problem: Secure Communication for Disaster Response Teams During emergency situations such as natural disasters, communication between rescue teams must remain confidential to prevent misuse of critical information. To achieve this, messages are encrypted using a Caesar Cipher before transmission. The Caesar Cipher works by shifting each letter in the message by a fixed number of positions in the alphabet. Example (Shift = 3): ATTACK → DWWDFN Here, A → D, T → W, Z → C (letters wrap around). Only uppercase alphabets (A–Z) are encrypted. Spaces and punctuation remain unchanged. Task Write a program to encrypt a given message using Caesar Cipher. You must define the function: def encrypt_message(message, shift): # Your code here Input Format The first line of input contains the message (string, may include spaces). The second line contains the shift value (integer). Output Format Print the encrypted message after applying the Caesar Cipher. Example Input: HELLO 3 Output: KHOOR





IMPORTANT: CERTIFICATION CRITERIA

Candidates have to come to the exam center and take the theory test.
(The date of the theory test will be announced by NPTEL) It is mandatory to take the Proctored in-person final exam to obtain a certificate.

To pass the course and get a certificate:

Assignment score >= 40/100 AND Programming exam score >= 40/100 AND Proctored exam score >= 40/100

OR

Assignment score >= 10/25 AND Programming exam score >= 10/25 AND Proctored exam score >= 20/50

All 3 conditions have to be satisfied.

ONLINE PROGRAMMING TEST

This exam is also known as unproctored exam.



Unproctored exam means you will give this exam at home in the absence of invigilator.
The date of this exam will be announced by NPTEL.
Duration of this exam is 1 hours only.
1 programming questions will be there.

Click here to download Joy previous year 1st session online programming test questions with answer.



Click here to download Joy previous year 2nd session online programming test questions with answer.



This exam is taken in two sessions(You can give this exam 2 times).
You can give this exam in the 1st session (Day session)
or
You can give this exam in the 2nd session (Night session)
or
You can give this exam in both the session.
But the best score will be counted for final exam certification.

This is like a programming assignment of 1 hour.
NPTEL will never ask to switch on any webcam during this exam.
NPTEL says you can't give this exam using phone.
But you can give this exam using phone.





We will definitely help for this exam.
Proctored Exam
1.All questions will be MCQ
2.No negative marking
3.Question will be just like your weekly quiz assignments.
3.Some Questions will be directly copy pasted from weekly assignments and some question will be somewhat twisted.
4.You must get 40% marks in this exam to get certificate.
See this video for more detail.