Assigment - 1 - Week 1 - 2023 - G
Assigment - 1 - Week 1 - 2023 - G
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
If already registered,
click to check your
payment status
Week 1: Assignment 1
The due date for submitting this assignment has passed.
Due on 2023-08-09, 23:59 IST.
Course outline
Assignment submitted on 2023-08-09, 21:25 IST
How does an NPTEL 1) What is the output of the following code? 1 point
online course work?
()
Week 0 ()
Week 1 ()
Introduction to 36
Python for Data 121212
Science (unit?
123
unit=18&lesson=19)
Error: Invalid operation, unsupported operator ‘*’ used between ‘int’ and ‘str’
Introduction to
Python (unit? Yes, the answer is correct.
Score: 1
unit=18&lesson=20)
Accepted Answers:
Introduction to Spyder 121212
- Part 1 (unit?
unit=18&lesson=21) 2) What is the output of the following code? 1 point
Introduction to Spyder
- Part 2 (unit?
unit=18&lesson=22)
Variables and -1
Datatypes (unit?
unit=18&lesson=23)
-2
-1.28
Operators (unit?
unit=18&lesson=24)
1.28
Practice: Week 1:
Assignment 1 (Non int
Graded) (assessment?
float
name=109)
str
Quiz: Week 1:
Code will throw an error.
Assignment 1
(assessment? Yes, the answer is correct.
name=117)
S 1
Score: 1
Week 1 Feedback
Form : Python For
Accepted Answers:
Data Science (unit?
str
unit=18&lesson=113)
4) Which of the following variable names are INVALID in Python? 1 point
Week 2 () 1_variable
variable_1
Week 3 ()
variable1
Week 4 () variable#
6) Let x = “Mayur”. Which of the following commands converts the ‘x’ to float datatype? 1 point
str(float,x)
x.float()
float(x)
Cannot convert a string to float data type
7) Which Python library is commonly used for data wrangling and manipulation? 1 point
Numpy
Pandas
scikit
Math
12.0
12
11.667
11
Yes, the answer is correct.
Score: 1
Accepted Answers:
12
9) Given two variables, j = 6 and g = 3.3. If both normal division and floor division operators were used to divide j by g, 1 point
what would be the data type of the value obtained from the operations?
int, int
float, float
float, int
int, float
10) Let a = 5 (101 in binary) and b = 3 (011 in binary). What is the result of the following operation? 1 point
3
7
5
1