25/07/2025, 12:22 Python for Data Science - - Unit 4 - Week 1
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
[email protected]
NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Python for Data Science (course)
Click to register
for Certification
exam
Week 1 : Assignment 1
(https://examform.nptel.ac.in/2025_10/exam_form/dashboard)
Assignment not submitted Due date: 2025-08-06, 23:59 IST.
If already 1) Which of the following variable names are INVALID in Python? 1 point
registered, click
to check your 1_variable
payment status variable_1
variable1
variable#
Course
outline 2) Which of the following operators have lower precedence than “not” in Python? 1 point
+
About
and
NPTEL ()
==
How does an |
NPTEL
online 3) What will be the output of the following code? 1 point
course a = 10
work? () b=5
p r i n t ( a ∗∗ b % 3 )
Week 1 ()
0
Introduction to
100
Python for
Data Science 1
(unit? 2
unit=18&lesso
n=19)
4) What will be the output of the following code snippet? 1 point
Introduction to g r e e t i n g s = ”Namaste”
Python (unit? g r e e t i n g s_1 = f l o a t ( g r e e t i n g s )
p r i n t ( type ( g r e e t i n g s_1 ) )
https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=18&assessment=165 1/3
25/07/2025, 12:22 Python for Data Science - - Unit 4 - Week 1
unit=18&lesso int
n=20)
float
Introduction to
str
Spyder - Part
1 (unit? Code will throw an error.
unit=18&lesso
5) Given two variables, j = 6 and g = 3.3. If both normal division and floor division 1 point
n=21)
operators were used to divide j by g, what would be the data type of the value obtained from the
Introduction to operations?
Spyder - Part
2 (unit? int, int
unit=18&lesso float, float
n=22)
float, int
Variables and int, float
Datatypes
(unit?
6) What will be the output of the following code snippet? 1 point
unit=18&lesso
n=23) a = ”10”
b=float(a)+5
Operators r e s u l t = s t r ( b ) + ”123”
(unit?
p r i n t ( type ( r e s u l t ) )
unit=18&lesso
n=24)
<c l a s s ’ f l o a t ’>
Setup Guide <c l a s s ’ s t r ’>
(unit?
<c l a s s ’ i n t ’>
unit=18&lesso
n=25) The code will give an error.
Week 1:
7) What will be the output of the following code snippet? 1 point
Lecture slides
a = 15
(unit?
b=3
unit=18&lesso
n=26) c=4
r e s u l t = a + b ∗ c // ( c % b ) − 5
Week 1-FAQs print(result)
(unit?
unit=18&lesso
n=27) 20
Week 1 1
Feedback
22
Form : Python
for Data 0
Science!!
(unit? 8) What is the output of the following code snippet? 1 point
unit=18&lesso a=4
n=113) b=5
Quiz: Week 1 a ∗= b ∗ 2
: Assignment print(a)
1
(assessment?
name=165) 10
20
Practice:
Week 1: 25
Practice 40
https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=18&assessment=165 2/3
25/07/2025, 12:22 Python for Data Science - - Unit 4 - Week 1
Assignment 1
(assessment?
9) What is the output of the following code snippet? 1 point
name=166) a=3
b=5
Week 2 () c = ( a == 3 ) and ( b == 5 ) o r ( a != 3 )
print(c)
True
False
Error
10) Let a = 5 (101 in binary) and b = 3 (011 in binary). What is the result of the following 1 point
operation?
a=5
b=3
print(a&b)
3
7
5
1
You may submit any number of times before the due date. The final submission will be
considered for grading.
Submit Answers
https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=18&assessment=165 3/3