NPTEL The Joy of Computing Using Python week 2 Answer 2023

 Week 2 NPTEL The Joy of Computing Using Python Answer 2023

Hello students, you'll get answer for week 1 NPTEL The Joy of Computing Using Python Week 2: Programming Assignment 1,Week 2: Programming Assignment 2,Week 2: Programming Assignment 3  2023 answer on our blog Sinceweb

NPTEL » Data Analytics with Python

Python is a high-level, interpreted programming language that is widely used for a variety of tasks such as web development, data analysis, machine learning, artificial intelligence, and scientific computing. It is known for its readability, simplicity and easy-to-learn syntax.

Python's standard library includes a wide variety of modules and tools that provide functionality for many different tasks, such as connecting to web servers, reading and writing files, and working with data. Additionally, there are many third-party libraries and frameworks available for Python, such as NumPy, pandas, and scikit-learn for data analysis and manipulation, and TensorFlow and PyTorch for machine learning and deep learning.

One of the most popular frameworks for web development in Python is Django. It is a high-level framework that provides a lot of built-in functionality for web development, making it easy to develop and deploy web applications quickly. Flask is another popular micro-framework for web development.

Python can be run on a variety of platforms, including Windows, Mac, and Linux, and it can be used in both command-line and graphical user interface (GUI) environments.

Python is also widely used in scientific computing and data visualization, thanks to libraries such as Matplotlib, Seaborn and Plotly. It is also used in GIS programming and automation with libraries like Arcpy, Fiona and GDAL/OGR.

Python is a versatile language that can be used for a wide variety of tasks, making it a popular choice for beginners and experienced programmers alike.


NPTEL The Joy of Computing Using Python week 1   Click here
NPTEL The Joy of Computing Using Python week 2     Click Here
NPTEL The Joy of Computing Using Python week 3    Click Here
NPTEL The Joy of Computing Using Python week 4
NPTEL The Joy of Computing Using Python week 5
NPTEL The Joy of Computing Using Python week 6
NPTEL The Joy of Computing Using Python week 7
NPTEL The Joy of Computing Using Python week 8

Due date: 2023-02-08, 23:59 IST

Answer of Week 2 NPTEL The Joy of Computing Using Python 2023:

1. What are the applications of Python?
  •  Image processing and graphic design applications
  •  Enterprise and business applications development
  •  Operating systems
  •  All of the above
  •  None of the above
Answer: All of the above

2.Which of the following is not the correct variable name
  •  Abc
  •  Abd23
  •  32asd
  •  Ab_cd_23
Answer: 32asd

(ads1)

3. Write the output of the following code.

L = [1,2,3,4,5,6,7,8,9]

print(L[::-1])
  •  [1,2,3,4,5,6,7,8,9]
  •  [1,2,3,4,5,9,8,7,6]
  •  [9,8,7,6,5,4,3,2,1]
  •  Error
Answer: [9,8,7,6,5,4,3,2,1]

4.Predict the output of the following code:

L = [[1,2,3],[0,4,5],[0,0,6]]

  •  3,2,1,5,4,6
  •  3 2 1 5 4 6
  •  0,0,0,0,0,0
  •  0 0 0 0 0 0
Answer: 3 2 1 5 4 6

5. Find all the error(s)in the following code:


  • Index out of range
  •  Syntax error
  •  Variable not defined
  •  'int' object does not support item assignment
Answer: Index out of range

6. What is the output of the following code:
  •  [0,1,2] (5,3,4)
  •  [0,1,2] (5,)
  •  [0] (5,3,4)
  •  [0] (5,)
Answers: [0,1,2] (5,)

7. What is the correct syntax for defining a function in Python?
  •  def function name():
  •  function function_name():
  •  function_name():
  •  def function_name:
Answer: def function_name:

8. What is the purpose of the continue statement in a for loop?
  •  To skip the rest of the current iteration and move on to the next one
  •  To terminate the loop and exit the loop block
  •  To return to the top of the loop and start a new iteration
  •  To skip the current iteration and move on to the next one, but only if a certain condition is met
Answers: To skip the current iteration and move on to the next one, but only if a certain condition is met

9. How do you check if a number is even in Python?
  •  if number % 2 == 0
  •  if number.is_even()
  •  if number % 2 is 0
  •  if number.even()
Answer: if number % 2 == 0

10. What should be the value of _ to print all numbers from 0-10?

  •  11
  •  9
  •  10
  •  None of the above
Answers: 11

The Joy of Computing Using Python week 2 | Programming Assignment 1 :

num = int(input())
print(num)

The Joy of Computing Using Python week 2 | Programming Assignment 2 :

num1 = int(input())
num2 = int(input())
print(num1 + num2)

The Joy of Computing Using Python week 2 | Programming Assignment 3 :

num = int(input())
for i in range(num+1):
    print(i)

CRITERIA TO GET A CERTIFICATE


Average assignment score = 25% of 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 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.

NOTE: Please note that there will not be an unproctored programming exam for this course this term.

COURSE TYPE : Elective
COURSE LEVEL: Undergraduate/Postgraduate

COURSE LAYOUT

  • Motivation for Computing
  • Welcome to Programming!!
  • Variables and Expressions : Design your own calculator
  • Loops and Conditionals : Hopscotch once again
  • Lists, Tuples and Conditionals : Lets go on a trip
  • Abstraction Everywhere : Apps in your phone
  • Counting Candies : Crowd to the rescue
  • Birthday Paradox : Find your twin
  • Google Translate : Speak in any Language
  • Currency Converter : Count your foreign trip expenses
  • Monte Hall : 3 doors and a twist
  • Sorting : Arrange the books
  • Searching : Find in seconds
  • Substitution Cipher : What’s the secret !!
  • Sentiment Analysis : Analyse your Facebook data
  • 20 questions game : I can read your mind
  • Permutations : Jumbled Words
  • Spot the similarities : Dobble game
  • Count the words : Hundreds, Thousands or Millions.
  • Rock, Paper and Scissor : Cheating not allowed !!
  • Lie detector : No lies, only TRUTH
  • Calculation of the Area : Don’t measure.
  • Six degrees of separation : Meet your favourites
  • Image Processing : Fun with images
  • Tic tac toe : Let’s play
  • Snakes and Ladders : Down the memory lane.
  • Recursion : Tower of Hanoi
  • Page Rank : How Google Works !!

Disclaimer:

The answers provided in this blogpost are for reference only and should not be used as a substitute for your own research and understanding of the subject matter. The answers have been researched and compiled to the best of our knowledge, but we cannot guarantee their accuracy or completeness. We strongly advise that you use this information as a starting point for your own research and not as the sole basis for your work. Please use your own discretion and always consult your instructor or professor for guidance.

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.