filmov
tv
Python for Data Science Week 1 Assignment 1 Solution | NPTEL | Swayam | Jan - Apr 2024
Показать описание
#pythonfordatascience #nptel #swayam #python #datascience
What is the output of the following code?
36
121212
123
What is the output of the following code?
-1
-2
-1.28
1.28
Consider a following code snippet. What is a data type of y
?
int
float
str
Code will throw an error.
Which of the following variable names are INVALID in Python?
1_variable
variable_1
variable1
variable#
While naming the variable, use of any special character other than underscore(_) ill throw which type of error?
Syntax error
Key error
Value error
Index error
Let x = “Mayur”. Which of the following commands converts the ‘x’ to float datatype?
str(float,x)
float(x)
Cannot convert a string to float data type
Which Python library is commonly used for data wrangling and manipulation?
Numpy
Pandas
scikit
Math
Predict the output of the following code.
12.0
12
11.667
11
Given two variables, j = 6 and g = 3.3. If both normal division and floor division operators were used to divide j by g, what would be the data type of the value obtained from the operations?
int, int
float, float
float, int
int, float
Let a = 5 (101 in binary) and b = 3 (011 in binary). What is the result of the following operation?
3
7
5
1 Instagram Link
What is the output of the following code?
36
121212
123
What is the output of the following code?
-1
-2
-1.28
1.28
Consider a following code snippet. What is a data type of y
?
int
float
str
Code will throw an error.
Which of the following variable names are INVALID in Python?
1_variable
variable_1
variable1
variable#
While naming the variable, use of any special character other than underscore(_) ill throw which type of error?
Syntax error
Key error
Value error
Index error
Let x = “Mayur”. Which of the following commands converts the ‘x’ to float datatype?
str(float,x)
float(x)
Cannot convert a string to float data type
Which Python library is commonly used for data wrangling and manipulation?
Numpy
Pandas
scikit
Math
Predict the output of the following code.
12.0
12
11.667
11
Given two variables, j = 6 and g = 3.3. If both normal division and floor division operators were used to divide j by g, what would be the data type of the value obtained from the operations?
int, int
float, float
float, int
int, float
Let a = 5 (101 in binary) and b = 3 (011 in binary). What is the result of the following operation?
3
7
5
1 Instagram Link