Home

Learn Programming & Prepare for NPTEL Exams... Swayam Solver is your one-stop destination for NPTEL exam preparation.

NPTEL The Joy of Computing using Python July - 2026 | Swayam

 

The Joy of Computing using Python - July 2026

 Please scroll down for latest Programs   ðŸ‘‡ 


Code compiled and tested successfully!



Week 03 - Programming Assignment 01

Due date on 2026-08-14, 23:59 IST

Your last recorded submission was on 2026-08-14, 16:24 IST.

Q.

During a school sports meet, the finishing times (in seconds) of runners are recorded. A lower time indicates a faster runner.

(a) Accept a space-separated list of positive real numbers representing finishing times.
(b) Find the minimum finishing time.
(c) Print the fastest finishing time.

Complete Program

Python
# --- START OF SOLUTION CODE ---
times = list(map(float, input().split()))
print(min(times))
# --- END OF SOLUTION CODE ---

Code Snippet to Paste in the Editor

Python
# --- START OF SOLUTION CODE ---
times = list(map(float, input().split()))
print(min(times))
# --- END OF SOLUTION CODE ---


You may submit any number of times before the due date. The final submission will be considered for grading.

This assignment has Public Test cases. Please click on "Compile & Run" button to see the status of Public test cases. Assignment will be evaluated only after submitting using Submit button below. If you only save as or compile and run the Program, your assignment will not be graded and you will not see your score after the deadline.

Evaluation Results

CompilationSuccessful|Public Test Cases: 4/4 Passed

Note: These tests may not be considered while scoring.

Public Test Cases

Test Case
Input
Expected Output
Output
Status
Test Case 1

12.5 11.8 13.2

11.8
11.8\n
Presentation Error
Test Case 2

9.5 8.4 8.4 10.1

8.4
8.4\n
Presentation Error
Test Case 3

15.0

15.0
15.0\n
Presentation Error
Test Case 4

7.2 7.8 6.9

6.9
6.9\n
Presentation Error


Week 03 - Programming Assignment 02

Due date on 2026-08-14, 23:59 IST

Q.

A weather station records daily temperatures as decimal values.

(a) Accept a space-separated sequence of real numbers.
(b) Convert each temperature to its integer part.
(c) Print the sum of all converted integer values.

Complete Program

Python
# --- START OF SOLUTION CODE ---
temps = input().split()
print(sum(int(float(x)) for x in temps))
# --- END OF SOLUTION CODE ---

Code Snippet to Paste in the Editor

Python
# --- START OF SOLUTION CODE ---
temps = input().split()
print(sum(int(float(x)) for x in temps))
# --- END OF SOLUTION CODE ---


You may submit any number of times before the due date. The final submission will be considered for grading.

This assignment has Public Test cases. Please click on "Compile & Run" button to see the status of Public test cases. Assignment will be evaluated only after submitting using Submit button below. If you only save as or compile and run the Program, your assignment will not be graded and you will not see your score after the deadline.

Evaluation Results

CompilationSuccessful|Public Test Cases: 4/4 Passed

Note: These tests may not be considered while scoring.

Public Test Cases

Test Case
Input
Expected Output
Output
Status
Test Case 1

25.8 30.2 18.9

73
73\n
Presentation Error
Test Case 2

10.0 20.7

30
30\n
Presentation Error
Test Case 3

5.5

5
5\n
Presentation Error
Test Case 4

0.8 1.9 2.1

3
3\n
Presentation Error



Week 03 - Programming Assignment 03

Due date on 2026-08-14, 23:59 IST

Your last recorded submission was on 2026-08-14, 16:56 IST.

Q.

A courier company records package weights (in kg).

(a) Accept a space-separated list of positive real numbers.
(b) Compute the average package weight.
(c) Count how many package weights are greater than the average.


Complete Program

Python
# --- START OF SOLUTION CODE ---
weights = list(map(float, input().split()))
avg = sum(weights) / len(weights)
print(sum(1 for w in weights if w > avg))
# --- END OF SOLUTION CODE ---

Code Snippet to Paste in the Editor

Python
# --- START OF SOLUTION CODE ---
weights = list(map(float, input().split()))
avg = sum(weights) / len(weights)
print(sum(1 for w in weights if w > avg))
# --- END OF SOLUTION CODE ---


You may submit any number of times before the due date. The final submission will be considered for grading.

This assignment has Public Test cases. Please click on "Compile & Run" button to see the status of Public test cases. Assignment will be evaluated only after submitting using Submit button below. If you only save as or compile and run the Program, your assignment will not be graded and you will not see your score after the deadline.

Evaluation Results

CompilationSuccessful|Public Test Cases: 4/4 Passed

Note: These tests may not be considered while scoring.

Public Test Cases

Test Case
Input
Expected Output
Output
Status
Test Case 1

2.5 3.0 5.5

1
1\n
Presentation Error
Test Case 2

1.0 1.0 1.0

0
0\n
Presentation Error
Test Case 3

10.5 20.5 30.5

1
1\n
Presentation Error
Test Case 4

4.2 5.1 6.3 7.4

2
2\n
Presentation Error


























































No comments:

Post a Comment

Keep your comments reader friendly. Be civil and respectful. No self-promotion or spam. Stick to the topic. Questions welcome.