# NPTEL The Joy of Computing using Python ASSIGNMENT 2 Answers 2022 NPTEL The Joy of Computing using Python ASSIGNMENT 2 Answers:- Hello students in this article we are going to share NPTEL The Joy of Computing using Python assignment week 2 answers. All the Answers provided below to help the students as a reference, You must submit your assignment at your own knowledge.

Below you can find NPTEL The Joy of Computing using Python Assignment 2 Answers

### NPTEL The Joy of Computing using Python Assignment 2 Answers 2022:-

Q1. What is the correct command to show the value stored in a variable?

a) show()
b) cout()
c) print()
d) out()

Ans:- c

Q2. What will be the output of the following piece of code?

a)Hello Mr. Bond 34
b) Hello Mr. 34
c) Hello Mr. Bond 35
d) Hello Mr. Bond 34

Ans:- c

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

a) 10,10
b)10
c)no output
d)error

Ans:- d

Q4. What is the extension of a python file?

a) sc
b) py
c) md
d)cp

Ans:- b

Q5. what will be the output of the following code, if the given input is 5?

A = input()

print(A*5)

a)25
b)55555
c)55
d)5

Ans:- b

Q6. Which of the following commands are correct to take input from a user?

a) n = input(‘Hello’)
b) n = input(“42”)
c) n = input(‘42’)
d) n = input(Hello)

e) n= input()

Ans:- a,b,c,e

Q7. What will be the output of the following code if the input is ‘5’?
a)25
b)25.0
c) Error
d) 5555

Ans:- a

Q8. Which of the following blocks of codes are correct?(Assume x and y are initialized)

Ans:- b

Q9. Which of the following statements are correct regarding the following code?