Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Exam (elaborations) PYTHON (Full Notes)

Rating
-
Sold
-
Pages
124
Grade
A+
Uploaded on
25-12-2023
Written in
2023/2024

This is full of python notes. This concept is full of business analytics and data science concepts. Full university question and answer bank

Institution
Course

Content preview

(PART A – 2 Marks)
UNIT - I
Q. No Questions
Write the code to print the number is divisible by 12?
n=int(input("Enter a number:"))
if(n%12==0):
*QA101 print("The Given Number is divisible by 12")
else:
print("The Given Number is not divisible by 12")

List out the data types?
Numbers
Strings
Booleans
QA102
Lists
Tuples
Dictionaries
Sets
Define square(sqr)?
QA103 def sqr(n):
return n*n

Define concat?
QA104 def concat(a,b):
return a+b

Print your age ?using calculation(code)
*QA105 An age
17

What is Data Science?
Data science is the area of study which involves methods to analyze massive amounts of
QA106
data and extracting knowledge from all the data that are gathered.

, What are the needs of data science?
The basic needs of data science are:
Better Decision Making
QA107
Predictive Analysis
Pattern Discovery


What are the different built-in data types in Python?
Python uses many built-in data types.




QA108




What is the lambda function?
 These are anonymous or nameless functions.
 Lambda functions are anonymous as they aren’t declared in the standard manner using the def keyword. Further, it
doesn’t even need the return keyword. Both are implicit in the function.
 These functions have their local namespace and don’t have any access to variables other than those in their perimeter list
QA109
and those in the global namespace.
Examples: x = lambda i,j: i+j
print (x(7,8))
Output: 15

QA110 What are built-in data types in Python?
Python data types define the variable type. Here are a few built-in data types in Python:
Numeric (int, float, and complex)
String (str)
Sequence (list, tuple, range)
Binary (bytes, byte array, memory view)

, Set (set)
Boolean (bool)
Mapping (dict)



UNIT - II
Q. No Questions

Explain numpy and sample code?
*QA201 import numpy as np
np.random.rand(3,4)

Write the code using data frame?
import pandas as pd
QA202 d = {'one' : pd.Series([1, 2, 3], index=['a', 'b', 'c']), 'two' : pd.Series([4,5,6],index=['a', 'b', 'c'])}
k=pd.DataFrame(d)
k['one']

Write syntax for pandas series & pandas dataframe?
QA203 pandas.Series( data, index, dtype, copy)
pandas.DataFrame( data, index, columns, dtype, copy)

Write the code for printing array?
import numpy as np
output_array = np.array([0, 1, 2, 3, 4, 5])
*QA204
print(output_array)
Output: array([0, 1, 2, 3, 4, 5])
Output: array([2, 4, 6, 8])
Explain SciPy?
SciPy is an open source Python library which is used to solve scientific and mathematical problems. The SciPy library depends
QA205 on NumPy, which provides convenient and fast N dimensional array manipulation


QA206 What are the commonly used Python libraries for data science?
 TensorFlow
 SciPy
 NumPy
 Pandas

,  Matplotlib
 Keras
 Scikit-learn
 PyTorch
 Scrapy
 BeautifulSoup

What is the difference between del(), clear(), remove(), and pop()?
 del(): Deletes the with respect to the value's position. Which value was deleted is not returned. It also changes the index
to the right by decreasing it by one value. It could also be used to delete the complete data structure.
QA207  clear(): Clears the list.
 remove(): Since it deletes in relation to the value, you can use it if you know which particular value to remove.
 pop(): By default, delete the last element and return the deleted value. It is frequently employed for creating referencing.


What is the difference between a Series and a DataFrame in Pandas?
 Series can only contain a single list with an index, whereas a DataFrame contains more than one series.
QA208  A series is a one-dimensional array that supports any datatype, including integers, float, strings, etc. In contrast, a
dataframe is a two-dimensional data structure with columns that can support different data types.


List a few methods of NumPy array.
 np.means()
QA209  np.cumsum()
 np.sum(),


What is the difference between series and vectors?
 Vectors: It can only assign values for index position as 0,1,…, (n-1).
QA210  Series: It only has one column. Series can be created from the array, list, and dictionaries. For every data series, it can
assign unique index position values.




UNIT - III
Q. No Questions

Written for

Course

Document information

Uploaded on
December 25, 2023
Number of pages
124
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$21.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
Techn028

Also available in package deal

Get to know the seller

Seller avatar
Techn028 Saveetha Engineering College
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
20
Last sold
-
Future Leaders

Don't Depend on Others....

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions