# NPTEL The Joy Of Computing Using Python Assignment 3 Answers 2022 Are you looking for the Answers to NPTEL The Joy Of Computing Using Python Assignment 3? This article will help you with the answer to the National Programme on Technology Enhanced Learning (NPTEL) Course The Joy Of Computing Using Python . So read the complete article carefully.

## What is The Joy Of Computing Using Python?

The Joy Of Computing Using Python is a fun-filled whirlwind tour of 30 hrs, covering everything you need to know to fall in love with the most sought-after skill of the 21st century. This course includes examples of analytics in a wide variety of industries, and we hope that students will learn how you can use analytics in their careers and life. One of the most important aspects of this course is that you, the student, are getting hands-on experience creating analytics models; we, the course team, urge you to participate in the discussion forums and to use all the tools available to you while you are in the course!

## CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

Below you can find the answers for NPTEL The Joy Of Computing Using Python Assignment 3 Answers

## NPTEL The Joy Of Computing Using Python Assignment 3 Answers 2022:-

Q1. What will be the output of the following code?

(A) Practice,Practice,Practice,Practice,Practice
(B) Practice makes the man perfect.
(C) Practice makes man perfect. the
(D) Makes man perfect. Practice the

Q2. What should be the code to print all Even numbers between 1-10 (both inclusive)?

Q3. What will be the output of the following code?

(A) Sorted List(L) containing random elements between 0-10 in descending order.
(B) Sorted List containing random elements between 0-10 in ascending order.
(C) Sorted List containing elements between 0-10.
(D) Sorted List containing elements between 0-9 in ascending order.

Q4. What will be the output of the following code?

(A) we were here together
(B) we were here
(C) we were
(D) we

???? Next Week Answers: Assignment 04 ????

Q5. What will be the value of list L?

(A) [‘Even’, ‘Odd’, ‘Even’, ‘Odd’]
(B) [‘Even’, ‘Odd’, ‘Even’, ‘Odd’, ‘Even’, ‘Odd’]
(C) [‘Even’, ‘Odd’, ‘Even’, ‘Even’, ‘Even’]
(D) [‘Even’, ‘Odd’, ‘Even’, ‘Odd’, ‘Even’]

????If there are any changes in answers will notify you on telegram so you can get a 100% score, So Join???? ????

Q6. What is the correct code for a function to return the sum of elements of list L?

Q7. What does the following code represent?

(A) Checks if a is divisible by b.
(B) Checks if b is divisible by a.
(C) Checks if a and b are multiples of 5.
(D) None of the above.

Q8. Suppose there exists a file named file.txt. What the following code will do?

(A) Print whatever is there in the file and add hey there.
(B) Throws an error in the end as the file is not opened in writable mode.
(C) Throws an error in the end as the file is not opened in readable mode.
(D) No error will be thrown and the code will work fine.

Q9. Suppose there is an empty file named file.txt. What will be the output of the following code?

(A) writing this file again
(B) hey there!!
(C) hey there!!writing this file again
(D) Throws an error

Q10. What will be the output of the following code?

(A) Alternative 1’s and 0’s respectively
(B) Alternative 0’s and 1’s respectively.
(C) All Zeroes towards left and ones towards the right.
(D) All ones towards the left and zeroes towards the right.

## Programming Assigment week 3

Q1. You are given a list named L. Print all the elements at odd position of list L.(We will take care of the input, you just have to print elements present at odd position)

Code:-

``````for a in range(len(L)):
if a%2!=0:
if len(L)-a<=2:
print(L[a],end="")
else:
print(L[a])``````

Q2. You are given a list L. Print the list of first 3 smallest elements in ascending order and last 2 greatest elements in descending order of the list L respectively.(We will take care of the input)

Code:-

``````print(sorted(L)[:3])
print(sorted(L)[::-1][:2],end="")``````

Q3. You are given a list L. Write a function all_even that accepts the list Land print all the even numbers is the list L.(Order of the numbers should be same as the order present in the list)

Code:-

``````def all_even(L):
ans=[]
for i in L:
if i%2==0:
ans.append(i)
for a in range(len(ans)):
if a==len(ans)-1:
print(ans[a],end="")
else:
print(ans[a])``````