[go: up one dir, main page]

0% found this document useful (0 votes)
48 views4 pages

Python For Data Science - Unit 4 - Week 1

The document outlines the first week's assignment for the 'Python for Data Science' course, detailing various questions related to Python programming concepts. It includes questions on variable naming, operator precedence, and code output predictions, with correct answers indicated for each question. The assignment submission deadline was August 6, 2025, and the document provides links for registration and checking payment status.

Uploaded by

Thangamari D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views4 pages

Python For Data Science - Unit 4 - Week 1

The document outlines the first week's assignment for the 'Python for Data Science' course, detailing various questions related to Python programming concepts. It includes questions on variable naming, operator precedence, and code output predictions, with correct answers indicated for each question. The assignment submission deadline was August 6, 2025, and the document provides links for registration and checking payment status.

Uploaded by

Thangamari D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

8/23/25, 3:48 PM Python for Data Science - - Unit 4 - Week 1

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dsmari2003@gmail.com 

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)
The due date for submitting this assignment has passed.

If already
Due on 2025-08-06, 23:59 IST.
registered, click
to check your Assignment submitted on 2025-08-06, 13:29 IST
payment status
1) Which of the following variable names are INVALID in Python? 1 point

1_variable

Course variable_1
outline variable1
variable#
About Yes, the answer is correct.
NPTEL () Score: 1
Accepted Answers:
How does an 1_variable
NPTEL variable#
online
course 2) Which of the following operators have lower precedence than “not” in Python? 1 point
work? ()
+
Week 0 () and
==
Week 1 ()
|
Introduction Yes, the answer is correct.
to Python for Score: 1
Data Science Accepted Answers:
(unit? and
unit=18&lesso
n=19)
3) What will be the output of the following code? 1 point
Introduction a = 10
to Python

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=18&assessment=165 1/4
8/23/25, 3:48 PM Python for Data Science - - Unit 4 - Week 1

(unit? b=5
unit=18&lesso p r i n t ( a ∗∗ b % 3 )
n=20)
0
Introduction
to Spyder - 100
Part 1 (unit? 1
unit=18&lesso
2
n=21)
Yes, the answer is correct.
Introduction Score: 1
to Spyder - Accepted Answers:
Part 2 (unit? 1
unit=18&lesso
n=22) 4) What will be the output of the following code snippet? 1 point
g r e e t i n g s = ”Namaste”
Variables and
g r e e t i n g s_1 = f l o a t ( g r e e t i n g s )
Datatypes
(unit?
p r i n t ( type ( g r e e t i n g s_1 ) )
unit=18&lesso
int
n=23)
float
Operators
str
(unit?
unit=18&lesso Code will throw an error.
n=24)
Yes, the answer is correct.
Setup Guide
Score: 1
(unit? Accepted Answers:
unit=18&lesso Code will throw an error.
n=25)
5) Given two variables, j = 6 and g = 3.3. If both normal division and floor division 1 point
Week 1:
operators were used to divide j by g, what would be the data type of the value obtained from the
Lecture slides
operations?
(unit?
unit=18&lesso
int, int
n=26)
float, float
Week 1-FAQs
float, int
(unit?
unit=18&lesso int, float
n=27)
Yes, the answer is correct.
Week 1
Score: 1
Feedback Accepted Answers:
Form : Python float, float
for Data
Science!! 6) What will be the output of the following code snippet? 1 point
(unit? a = ”10”
unit=18&lesso b=float(a)+5
n=113)
r e s u l t = s t r ( b ) + ”123”
Quiz: Week 1 p r i n t ( type ( r e s u l t ) )
: Assignment
1 <c l a s s ’ f l o a t ’>
(assessment? <c l a s s ’ s t r ’>
name=165)
<c l a s s ’ i n t ’>
Practice: The code will give an error.
Week 1:

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=18&assessment=165 2/4
8/23/25, 3:48 PM Python for Data Science - - Unit 4 - Week 1

Practice Yes, the answer is correct.


Assignment 1
Score: 1
(assessment? Accepted Answers:
name=166) <c l a s s ’ s t r ’>

7) What will be the output of the following code snippet? 1 point


Week 2 ()
a = 15
b=3
Week 3 ()
c=4
r e s u l t = a + b ∗ c // ( c % b ) − 5
Week 4 ()
print(result)

Supporting
material for
20
Week 4 ()
1

Download 22
Videos () 0
Yes, the answer is correct.
Problem Score: 1
Solving Accepted Answers:
Session - 22
July 2025 ()
8) What is the output of the following code snippet? 1 point
a=4
b=5
a ∗= b ∗ 2
print(a)

10
20
25
40

Yes, the answer is correct.


Score: 1
Accepted Answers:
40

9) What is the output of the following code snippet? 1 point


a=3
b=5
c = ( a == 3 ) and ( b == 5 ) o r ( a != 3 )
print(c)

True
False
Error

Yes, the answer is correct.

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=18&assessment=165 3/4
8/23/25, 3:48 PM Python for Data Science - - Unit 4 - Week 1

Score: 1
Accepted Answers:
True

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

Yes, the answer is correct.


Score: 1
Accepted Answers:
1

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=18&assessment=165 4/4

You might also like