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
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Â
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Â
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 Â
Q7. What will be the output of the following code?
b=0for i in range(10):Â Â Â b=b+iprint(b) {codeBox}Â
A. 0
B. 45
C. 43
D. 50
Answer: [ B ] 45Â
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*2print(new_number) {codeBox}
A. 60
B. Error
C. 3030
D. 30
Answer: [ C ] 3030
Q10. What is the output for the following program?
a=3b=4c=a>bprint(c) {codeBox}
A. True
B. False
C. It will display an error message
D. Boolean
Answer: [ B ]Â False
Also Read:Â Joy of Computing Using Python Week 1 AnswersÂ
ConclusionÂ
All of these are Correct. If there are any change in answers, please visit on or before to the last date.Â