NPTEL The Joy Of Computing Using Python Assignment 3 Answers 2023

NPTEL The Joy Of Computing Using Python Assignment 3 Answers 2023

Hello learners In this article we are going to discuss NPTEL The Joy Of Computing Using Python Assignment 3 Answers. All the Answers provided below to help the students as a reference, You must submit your assignment with your own knowledge and use this article as reference only.

About the course:-

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. The course brings programming to your desk with anecdotes, analogies and illustrious examples. Turning abstractions to insights and engineering to art, the course focuses primarily to inspire the learner’s mind to think logically and arrive at a solution programmatically.

Assignment No.Answers
The Joy Of Computing Using Python Assignment 1 Click Here
The Joy Of Computing Using Python Assignment 2 Click Here
The Joy Of Computing Using Python Assignment 3 Click Here
The Joy Of Computing Using Python Assignment 4 Click Here
The Joy Of Computing Using Python Assignment 5 Click Here
The Joy Of Computing Using Python Assignment 6 Click Here
The Joy Of Computing Using Python Assignment 7 Click Here
The Joy Of Computing Using Python Assignment 8 Click Here
The Joy Of Computing Using Python Assignment 9 Click Here
The Joy Of Computing Using Python Assignment 10 Click Here
The Joy Of Computing Using Python Assignment 11 Click Here
The Joy Of Computing Using Python Assignment 12 Click Here

NPTEL The Joy Of Computing Using Python Assignment 3 Answers 2023:

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

L = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’]

print(L[2:5])

  • a, b, c
  • a, b, c, d
  • c, d, e
  • c, d, e, f
Answer :- Will update answers soon and update on our telegram channel so Join Click Here

2. Which of the following is a valid way to declare a dictionary in Python?

  • {1: “one”, 2: “two”, 3: “three”}
  • [1: “one”, 2: “two”, 3: “three”]
  • (1: “one”, 2: “two”, 3: “three”)
  • <1: “one”, 2: “two”, 3: “three”>
Answer :- 

3. Which of the following method is correct to add an element at a specific position?

  • insert()
  • add()
  • append()
  • index()
Answer :- 

Next Week Answers: Assignment 04

quizxp telegram

4. What is the correct syntax to add an item to the end of a list in Python?

  • list.add(item)
  • list.append(item)
  • list.insert(item)
  • list.extend(item)
Answer :- 

5. Which of the following is not a valid data type in Python?

  • integer
  • string
  • float
  • character
Answer :- 

6. What is the output of the following code?

for i in range(1, 21):

    if i % 3 == 0 and i % 5 == 0:

        print(“FizzBuzz”)

    elif i % 3 == 0:

        print(“Fizz”)

    elif i % 5 == 0:

        print(“Buzz”)

    else:

        print(i)

Prints numbers from 1 to 20

Prints Fizz for multiples of 3 and Buzz for multiples of 5

Prints FizzBuzz for multiples of 3 and 5

None of the above

Answer :- 

7. What is the output of the following code?

a = 5

b = 2

print(a // b)

  • 2
  • 2.5
  • 3
  • 2.0
Answer :- 

8. What is the output of the following code?

s = “hello”

print(s[::-1])

  • “hello”
  • “olleh”
  • “hlo”
  • “leh”
Answer :- 

9. What is the output of the following code?

a = 10

b = 5

c = a % b

print(c)

  • 2
  • 5
  • 0
  • 1
Answer :- 

10. What is the output of the following code?

s = “python”

print(s[1:4])

  • “pyt”
  • “yth”
  • “tho”
  • “hon”
Answer :-