NPTEL Joy Of Computing Using Python Week 2 Answers 2023

Hello Everyone, In this article we are going to see the Joy Of Computing Using Python Week 2 answers. I am sharing these answers to the best of my knowledge. Any change in the answers, visit the website on or before the last date. 

Also Read: Joy of Computing Using Python Week 1 Answers 

NPTEL Joy Of Computing Using Python Week 2 Answers July 2023

NPTEL Joy Of Computing Using Python

In this Week 2, we are going to learn 

  • Installation of Anaconda 
  • Introduction to Spyder 
  • Printing Statements in Python 
  • Understanding  Variables in python 
  • Taking the inputs from the user 
  • Introduction to loops 

Week 2 Assignment 

Q1. Which of the following is a high-level programming language?
 
A. Assembly
B. C
C. Python
D. Machine Language

Answer: [ C ]  Python 

 
Which of the following is a high-level programming language?


Q2. Which of the following is an example of a front-end programming language?
 
A. PHP
B. Java
C. HTML
D. SQL

Answer: [ C ]  HTML 

 
Which of the following is an example of a front-end programming language?


Q3. Which of the following is used to store data in a programming language?
 
A. Variables
B.  Arrays
C.  Loops
D. Conditionals

Answer: [ A, C ]  Variables, Arrays

Q4. Which statement will print ‘The joy of computing’?

A. print(The joy of computing)
B. print The joy of computing
C. printf(‘The joy of computing’)
D. print(‘The joy of computing’)

Answer: [ D ] print(‘The joy of computing’)

In Option 1, inside the print statement ' ' are missing 
In Option 2, Paranthesis are missing after print statement
In Option 3, printf is not used in python 
 
Q5. What should be the value of _ to print all numbers from 0-10

for i in range(  _  ):
       print(i) {codeBox}

A. 10
B. 9
C. 11
D. None of the above

Answer: [ C ]  11 

It prints the statement until n-1 
So answer will be 11. 

Q6. Which of the following keyword is used to declare a function in a programming language?
 
A. def
B. var
C. int
D. float

Answer: [ A ]  def  

Which of the following keyword is used to declare a function in a programming language?



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

b=0

for i in range(10):
      b=b+i
print(b) {codeBox} 

A. 0
B. 45
C. 43
D. 50

Answer: [ B ] 45 

b=0  for i in range(10):       b=b+i print(b)


Q8. What value will c store in it after the execution of the below code?

  c=b**3

A. Value of b multiplied by 3
B. Cube of b
C. Value of b multiplied with 3 twice
D. It will throw an error

Answer: [ B ]  Cube of b 

Q9. What will be the output? suppose the input is 30 

number = input("Enter Number")
new_number = number*2
print(new_number) {codeBox}

A.  60
B. Error
C. 3030
D. 30

Answer: [ C ] 3030




Q10. What is the output for the following program?

a=3
b=4
c=a>b
print(c) {codeBox}

A. True
B. False
C. It will display an error message
D. Boolean

Answer: [ B ]  False

 


Conclusion 


All of these are Correct. If there are any change in answers, please visit on or before to the last date. 

Join our telegram channel 👇👇 

 CLICK HERE  for more updates and answers. 


One Comment Please !

Post a Comment (0)
Previous Post Next Post