Assignment 2: Unit 4 - Week 2
Assignment 2: Unit 4 - Week 2
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
Unit 4 - Week 2
Course
outline Assignment 2
How does an The due date for submitting this assignment has passed. Due on 2020-02-12, 23:59 IST.
NPTEL online As per our records you have not submitted this assignment.
course work?
1) Which of the following options correctly prints the phrase “Hurry Up!!”? 1 point
Week 0
printf(“Hurry Up!!”)
Introduction to
Spyder IDE
(unit?
unit=20&lesson=23)
Printing
statements in Hi Arjuna Bhimaa
Python (unit?
unit=20&lesson=24) Hi Arjuna Hi Bhimaa
Hi Hi Arjuna Bhimaa
Understanding
Variables in Hi Arjuna Bhimaa Hi
Python (unit? No, the answer is incorrect.
unit=20&lesson=25) Score: 0
Accepted Answers:
Executing a
Hi Hi Arjuna Bhimaa
sequence of
https://onlinecourses.nptel.ac.in/noc20_cs35/unit?unit=20&assessment=261 1/4
02/07/2020 The Joy of Computing using Python - - Unit 4 - Week 2
instructions in 3) With what extension are the python files saved? 1 point
the Console
(unit? .p
unit=20&lesson=26)
.python
Writing your .pyn
First Program
.py
(unit?
unit=20&lesson=27) No, the answer is incorrect.
Score: 0
Taking inputs Accepted Answers:
from the user .py
(unit?
unit=20&lesson=28) 4) Which of the following statements correctly represents taking input from user in python? 1 point
Discount
a=get("Enter the value")
Calculation
(unit? a=inp("Enter the value")
unit=20&lesson=29) a=input("Enter the value")
Motivation to if None of the above
condition (unit?
No, the answer is incorrect.
unit=20&lesson=30) Score: 0
A reminder on
Accepted Answers:
how to deal with
a=input("Enter the value")
numbers (unit?
5) What is the output of the following code? 1 point
unit=20&lesson=31)
Understanding if
condition's
working (unit?
unit=20&lesson=32)
Realizing the
importance of
syntax and
indentation
(unit?
-20
unit=20&lesson=33) Syntax error
Introductions to 20
loops (unit? Displays nothing
unit=20&lesson=34)
No, the answer is incorrect.
Loops: Sum of Score: 0
numbers (unit? Accepted Answers:
unit=20&lesson=35) Syntax error
Loops:
displays numbers from 0 to 4
Multiplication
Tables (unit? displays numbers from 1 to 5
unit=20&lesson=37) displays numbers from 0 to 5
Introduction to none of the above
While Loop
No, the answer is incorrect.
(unit? Score: 0
unit=20&lesson=38) Accepted Answers:
Quiz :
displays numbers from 0 to 4
Assignment 2
https://onlinecourses.nptel.ac.in/noc20_cs35/unit?unit=20&assessment=261 2/4
02/07/2020 The Joy of Computing using Python - - Unit 4 - Week 2
Programming
Assignment-1:
Introduction to
Online Portal
(/noc20_cs35/progassignment? displays table of 2
name=268) syntax error
Programming displays table of 10
Assignment-2: none of the above
Addition
No, the answer is incorrect.
(/noc20_cs35/progassignment?
name=269) Score: 0
Accepted Answers:
Programming none of the above
Assignment-3:
Small 8) What does the following code do? 1 point
(/noc20_cs35/progassignment?
name=270)
Week 2
Feedback (unit?
unit=20&lesson=271)
Week 3
24
week 4 0
120
Week 5
none of the above
Week 9
Week 10
Week 11
Week 12 4321
54321
Text Transcripts
43210
543210
Download Videos
No, the answer is incorrect.
Score: 0
Books
Accepted Answers:
4321
https://onlinecourses.nptel.ac.in/noc20_cs35/unit?unit=20&assessment=261 3/4
02/07/2020 The Joy of Computing using Python - - Unit 4 - Week 2
abc
ab
bc
Error
No, the answer is incorrect.
Score: 0
Accepted Answers:
Error
https://onlinecourses.nptel.ac.in/noc20_cs35/unit?unit=20&assessment=261 4/4