100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Exam (elaborations) PYTHON (Full Notes) $21.49   Add to cart

Exam (elaborations)

Exam (elaborations) PYTHON (Full Notes)

 5 views  0 purchase
  • Course
  • Institution

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

Preview 4 out of 124  pages

  • December 25, 2023
  • 124
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
avatar-seller
(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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Techn028. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $21.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73314 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$21.49
  • (0)
  Add to cart