AI Viva + Matplotlib + DataFrame Quick Notes
1. Basic AI Viva Questions
Q: What is Artificial Intelligence?
A: AI is the ability of machines to think, learn, and make decisions like humans.
Q: Give examples of AI.
A: Chatbots, face recognition, self-driving cars, recommendation systems.
Q: What is Machine Learning?
A: Machine Learning is a part of AI where machines learn from data.
Q: Difference between AI and Machine Learning?
A: AI is the main field, ML is a subset that learns from data.
Q: What is supervised learning?
A: Learning using labeled data.
Q: What is data preprocessing?
A: Cleaning and preparing data before training AI models.
Q: What is overfitting?
A: When a model learns training data too well and fails on new data.
2. DataFrame (Pandas) Viva Questions
Q: What is a DataFrame?
A: A DataFrame is a table-like structure in Pandas with rows and columns.
Q: Why do we use Pandas?
A: To store, analyze, and manipulate data easily.
Q: How do you create a DataFrame?
A: [Link](data)
Q: How do you read a CSV file?
A: pd.read_csv('[Link]')
Q: What does [Link]() do?
A: Shows the first 5 rows of a DataFrame.
Q: How do you find mean?
A: [Link]()
3. Matplotlib Viva Questions
Q: What is Matplotlib?
A: A Python library used for data visualization.
Q: Types of plots in Matplotlib?
A: Line plot, Bar chart, Histogram, Scatter plot, Box plot.
Q: What is a Histogram?
A: A graph showing data distribution.
Q: What is a Scatter Plot?
A: Shows relationship between two variables.
Q: Why do we use data visualization?
A: To understand patterns and trends easily.
4. Practical Quick Codes
Create DataFrame
import pandas as pd data = {"Name": ["A", "B"], "Marks": [80, 90]} df =
[Link](data) print(df)
Histogram
import [Link] as plt marks = [80, 90, 70, 85] [Link](marks)
[Link]()
Bar Chart
[Link](df["Name"], df["Marks"]) [Link]()
Scatter Plot
[Link](range(len(marks)), marks) [Link]()