0% found this document useful (0 votes)
15 views4 pages

Day 1-Assignment

Uploaded by

imrankhan8887
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Day 1-Assignment

Uploaded by

imrankhan8887
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

DA/DS Internship NAME :- IMRAN KHAN

Batch :- 55 - 360DigiTMG Email :- [email protected]


W/N :- +918002862061

CRISP-ML(Q) Session-1
1) What are the 4 stages of analytics? Define them.
ANS: - The 4 levels of analytics, additionally known as stages or types, can be understood as a sequential procedure
that enables extract insights from information. They are:

Descriptive Analytics: This is the most primary stage and answers the question "What came about?". It specializes in
summarizing and describing beyond activities the usage of information aggregation and visualization techniques like
charts, graphs, and primary reports. For instance, a sales file displaying total sales by way of location could be
descriptive analytics.

Diagnostic Analytics: Once you recognize "what befell," you may delve deeper into "why" it took place. This is the
role of diagnostic analytics. It includes analyzing the records to pick out the root causes and reasons in the back of
the patterns observed inside the descriptive level. Techniques like records mining and drill-downs are used to find
those reasons.

Predictive Analytics: This degree is going beyond the past and gift to predict destiny results. It uses ancient data,
statistical fashions, and device studying algorithms to forecast tendencies and count on what would possibly
manifest. Businesses can use this to predict patron churn, product call for, or marketplace fluctuations.

Prescriptive Analytics: This is the maximum advanced stage and takes analytics a step similarly by means of no longer
only predicting the future but additionally suggesting movements to optimize it. It leverages the insights from
preceding ranges to advocate the first-rate path of motion based at the expected outcomes. This allows corporations
make information-driven decisions and acquire their dreams.

2) What is the abbreviation of CRISP-ML(Q) and the '6' phases?


ANS:- CRISP-ML(Q) stands for Cross-Industry Standard Process for Machine Learning with Quality assurance. The six
phases are:

1. Business and Data Understanding

2. Data Preparation

3. Modeling

4. Evaluation

5. Deployment

6. Monitoring and Maintenance

SQL for Data Analytics & Data Science | Day 1


1) What is the role of databases?
ANS :- The role of databases is to:

1. Store Data: Efficiently store large amounts of structured and unstructured data.

2. Retrieve Data: Allow for quick and precise retrieval of data using queries.

3. Manage Data: Provide tools for data management, including updates, deletions, and insertions.
4. Ensure Data Integrity: Maintain data accuracy, consistency, and integrity through constraints and validation rules.

5. Support Transactions: Enable transaction management to ensure that operations are completed successfully and
maintain data consistency.

6. Secure Data: Protect data through authentication, authorization, and encryption.

7. Backup and Recovery: Provide mechanisms for data backup and recovery to prevent data loss.

8. Facilitate Data Sharing: Enable multiple users and applications to access and share data concurrently.

9. Support Analytics: Provide support for data analysis, reporting, and business intelligence operations.

10. Scale: Handle increasing amounts of data and user loads efficiently.

2) Write a query for creating a database and table?


ANS :- # Creating a Database
CREATE DATABASE my_database;

#Creating a Table

USE my_database;

#Then, create a table within that database. For example, creating a table called ‘employees’:

CREATE TABLE employees (


id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50),
email VARCHAR(100),
hire_date DATE,
job_title VARCHAR(50),
salary DECIMAL(10, 2)
);

This ‘employees’ table includes the following columns:

• `id`: An integer that auto-increments and serves as the primary key.


• `first_name`: A string to store the employee's first name.
• `last_name`: A string to store the employee's last name.
• `email`: A string to store the employee's email address.
• `hire_date`: A date to store the date the employee was hired.
• `job_title`: A string to store the employee's job title.
• `salary`: A decimal value to store the employee's salary.

Tame the python | Day 1


1) How can say that python is case-sensitive. Explain with examples?
ANS:- Python is a case-sensitive programming language. This means that it treats uppercase and lowercase
letters as distinct characters. Here are some examples to illustrate this:

• Variable names:
Python
message = "Hello, world!" # This is valid
MESSAGE = "Hello, world!" # This would cause an error

age = 25 # This is valid


Age = 25 # This would cause an error (Age is not defined)

In the first example, message and MESSAGE are considered different variables. Assigning a value to message
doesn't affect MESSAGE.

• Keywords:

Python
if age > 18: # This is valid
If age > 18: # This would cause an error (If is not a keyword)

Python has reserved keywords that have specific meanings in the language. These keywords are also case-sensitive.
Using an uppercase version of a keyword would be interpreted as a variable name, leading to an error.

• Functions:

Python
def greet(name): # This is a function definition
Greet(name) # This would cause an error (Greet is not defined)

Function names are also case-sensitive. You need to call the function using the exact name it was defined
with.

• Built-in functions:

Python
print("This is printed") # This is valid
Print("This is printed") # This would cause an error (Print is not a function)

Built-in functions in Python are also case-sensitive. Using an uppercase version of a built-in function would result in
an error.

2) Write a few rules to create the variable in Python?


ANS:- Here are some rules to create variables in Python:
1. Start with a letter or underscore (_): The first character of a variable name must be a letter
(uppercase or lowercase A-Z, a-z) or an underscore. Numbers cannot be the first character.
2. Use only alphanumeric characters and underscores: The rest of the variable name can consist of
letters, numbers, and underscores. Special characters like $, %, & are not allowed.
3. Avoid using reserved keywords: Python has a set of reserved words that have special meanings in
the language. These words cannot be used as variable names. Here are some examples of reserved
keywords: if, else, for, while, def, class, and, or, not, etc.
4. Variable names are case-sensitive: As mentioned previously, Python is case-sensitive. So, age and
Age are considered different variables.
5. Use meaningful names: Choose descriptive variable names that reflect the purpose of the variable.
This improves code readability and maintainability. For example, instead of x, use name or total_cost.

Here are some additional tips for creating good variable names:
• Use lowercase with underscores for separation: This is the most common convention in Python
(PEP 8 style guide). For example, customer_name, total_amount.
• Avoid single-letter variable names: Unless the variable is used in a very specific context (like loop
counters), it's better to use more descriptive names.
• Don't use variable names that might be confused with built-in functions: For example, avoid using
len as a variable name because it's already a built-in function that calculates length.

You might also like