DADS301 PROGRAMMING IN DATA SCIENCE FEB MAR 2025

190.00

Match your questions with the sample provided in description

Note: Students should make necessary changes before uploading to avoid similarity issues in Turnitin.

If you need unique assignments

Turnitin similarity between 0 to 20 percent
Price is 700 per assignment
Buy via WhatsApp at 8791514139

Description

SESSION FEB-MAR 2025
PROGRAM MASTER OF BUSINESS ADMINISTRATION (MBA)
SEMESTER III
COURSE CODE & NAME DADS301 PROGRAMMING IN DATA SCIENCE
   
   

 

 

Assignment Set – 1

 

 

Q1. (a) Describe a list. How are lists created in R? Explain with an example. Also, explain how the lists are accessed and modified.

(b) Discuss the function used to create new columns in R. Explain with an example for creation of a new column based on the values of existing columns in R.       5+5     

Ans 1.

(a) Lists in R

In R, a list is a versatile data structure that can hold multiple elements of different data types. Unlike vectors that contain elements of the same type, lists allow a combination of numbers, strings, logical values, vectors, and even other lists. Lists are used extensively in data analysis and statistical modeling in R because of their flexibility in storing and handling heterogeneous data.

Creation of Lists in R

Lists are created in R using the list() function. This function can accept different types of objects as arguments and bundle them together in a single list object. Each item in the list can

Its Half solved only

Buy Complete assignment from us

Price – 190/  assignment

MUJ Manipal University Complete SolvedAssignments  MARCH 2025

buy cheap assignment help online from us easily

we are here to help you with the best and cheap help

Contact No – 8791514139 (WhatsApp)

OR

Mail us-  [email protected]

Our website – www.assignmentsupport.in

 

Q2. (a) Illustrate the following functions with example in R.

  1. spread ()
  2. gather ()
  3. filter ()

(b) Articulate the summary () method with an example in R.       5+5     

Ans 2.

Demonstration of the spread() Function in R

The spread() function is used to transform data from a long format to a wide format in R. This function is part of the tidyr package and is particularly useful when you want to convert a key-value pair column into multiple columns based on a key. For instance, consider a dataset where each row shows a student’s score in a particular subject. If we want each subject as a column and the scores accordingly, we use spread().

 

 

Q3. (a) Criticize with an example the syntax of various looping constructs in R – For, While and Repeat statements.

(b) Examine with an example of random variable that follows Poisson distribution. How can this be simulated using R?         5+5     

Ans 3.

 (a) Criticize with an Example the Syntax of Various Looping Constructs in R – For, While and Repeat Statements

Syntax and Example of for Loop in R

The for loop is commonly used in R to iterate over a sequence of elements. Its syntax is straightforward but can become inefficient with large datasets compared to vectorized operations.

Example:

for (i in 1:5) {

print(paste(“Value is”, i))

}

While for loops are easy to understand, they can be slow for computations over large vectors. R is optimized for vectorized operations, so using loops excessively may affect performance.

 

 

Assignment Set – 2

 

Q4. (a) Discuss dictionaries in Python. Implement where a dictionary can be used.

(b) Illustrate how strings are converted into iterables in Python? Give a suitable example. 5+5

 

Ans 4.

(a) Understanding Dictionaries in Python

Dictionaries in Python are powerful data structures that store values as key-value pairs. Unlike lists or tuples where values are accessed by index, dictionaries allow access through unique keys. These keys must be immutable, meaning they can be strings, numbers, or tuples, but not lists. The basic syntax for a dictionary is enclosed within curly braces {} and follows the format key: value.

Dictionaries are unordered collections until Python 3.6. From Python 3.7 onwards, they

 

 

Q5. (a) Summarize “waffle charts”. When is it used? Explain with an example in python.

(b) Demonstrate the summation of elements be performed rowwise, columnwise and as a whole on a 2D array in Python. Explain with example.    5+5     

Ans 5.

(a) Summarize Waffle Charts and Their Usage with Python Example

Concept of Waffle Charts

Waffle charts are a specialized form of data visualization used to depict part-to-whole relationships. Unlike pie charts or stacked bars, waffle charts use a grid layout filled with colored squares or “tiles,” where each tile represents a fixed unit of the total. Typically, 100 tiles are used to reflect percentages. Each category is assigned a color, and the number of colored tiles reflects its proportion. Waffle charts are especially effective in dashboards or

 

 

Q6. (a) Contrast the difference between loc and iloc attributes with example.

(b) Operate the map () method. Explain with example.     5+5

Ans 6.

(a) Contrast the Difference Between loc and iloc Attributes with Example

Understanding loc and iloc in Pandas

In Pandas, loc and iloc are two essential attributes for data selection. While they appear similar, they differ in how they access data from a DataFrame. loc is label-based, meaning it selects rows and columns using their explicit labels. On the other hand, iloc is integer-based, meaning it selects data by the index position. This difference is crucial when working with datasets that have non-numeric or custom indexing.

Examples Demonstrating the Difference

Consider the following code:

MUJ Assignment
DADS301 PROGRAMMING IN DATA SCIENCE FEB MAR 2025
190.00